
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: y and z 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 (* a 4.0)))
(t_2
(- (+ (- (* (* (* (* x 18.0) y) z) t) t_1) (* b c)) (* (* x 4.0) i)))
(t_3 (* j (* 27.0 k))))
(if (<= t_2 -5e-77)
(-
(+ (- (* (* x (* 18.0 y)) (* z t)) t_1) (- (* b c) (* x (* 4.0 i))))
t_3)
(if (<= t_2 INFINITY)
(fma
(* j -27.0)
k
(fma t (fma x (* y (* 18.0 z)) (* a -4.0)) (fma b c (* -4.0 (* x i)))))
(- (* x (+ (* 18.0 (* z (* y t))) (* i -4.0))) t_3)))))assert(y < z);
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 * (a * 4.0);
double t_2 = ((((((x * 18.0) * y) * z) * t) - t_1) + (b * c)) - ((x * 4.0) * i);
double t_3 = j * (27.0 * k);
double tmp;
if (t_2 <= -5e-77) {
tmp = ((((x * (18.0 * y)) * (z * t)) - t_1) + ((b * c) - (x * (4.0 * i)))) - t_3;
} else if (t_2 <= ((double) INFINITY)) {
tmp = fma((j * -27.0), k, fma(t, fma(x, (y * (18.0 * z)), (a * -4.0)), fma(b, c, (-4.0 * (x * i)))));
} else {
tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_3;
}
return tmp;
}
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * 4.0)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_1) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) t_3 = Float64(j * Float64(27.0 * k)) tmp = 0.0 if (t_2 <= -5e-77) tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) - t_1) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - t_3); elseif (t_2 <= Inf) tmp = fma(Float64(j * -27.0), k, fma(t, fma(x, Float64(y * Float64(18.0 * z)), Float64(a * -4.0)), fma(b, c, Float64(-4.0 * Float64(x * i))))); else tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) - t_3); end return tmp end
NOTE: y and z 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[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-77], N[(N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(N[(j * -27.0), $MachinePrecision] * k + N[(t * N[(x * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot 4\right)\\
t_2 := \left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t_1\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\\
t_3 := j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-77}:\\
\;\;\;\;\left(\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) - t_1\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - t_3\\
\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, \mathsf{fma}\left(t, \mathsf{fma}\left(x, y \cdot \left(18 \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right) - t_3\\
\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.99999999999999963e-77Initial program 89.9%
associate-*l*89.9%
associate--l+89.9%
distribute-rgt-out--89.9%
associate-*l*88.4%
associate-*l*88.4%
Simplified88.4%
associate-*r*89.9%
distribute-rgt-out--89.9%
associate-*l*93.2%
associate-*l*93.1%
*-commutative93.1%
Applied egg-rr93.1%
if -4.99999999999999963e-77 < (-.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)) < +inf.0Initial program 94.5%
Simplified95.2%
+-commutative95.2%
*-commutative95.2%
fma-def97.6%
associate-*r*97.6%
associate-*r*97.6%
Applied egg-rr97.6%
if +inf.0 < (-.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 0.0%
associate-*l*0.0%
associate--l+0.0%
distribute-rgt-out--25.0%
associate-*l*25.0%
associate-*l*25.0%
Simplified25.0%
associate-*r*25.0%
distribute-rgt-out--0.0%
associate-*l*6.3%
associate-*l*6.3%
*-commutative6.3%
Applied egg-rr6.3%
Taylor expanded in x around inf 75.0%
cancel-sign-sub-inv75.0%
associate-*r*75.0%
metadata-eval75.0%
*-commutative75.0%
Simplified75.0%
Final simplification94.2%
NOTE: y and z 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 (* 27.0 k)))
(t_2 (* t (* a 4.0)))
(t_3
(-
(- (+ (- (* (* (* (* x 18.0) y) z) t) t_2) (* b c)) (* (* x 4.0) i))
(* k (* j 27.0)))))
(if (<= t_3 -5e+246)
(-
(+ (- (* (* x (* 18.0 y)) (* z t)) t_2) (- (* b c) (* x (* 4.0 i))))
t_1)
(if (<= t_3 INFINITY)
t_3
(- (* x (+ (* 18.0 (* z (* y t))) (* i -4.0))) t_1)))))assert(y < z);
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 * (27.0 * k);
double t_2 = t * (a * 4.0);
double t_3 = (((((((x * 18.0) * y) * z) * t) - t_2) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0));
double tmp;
if (t_3 <= -5e+246) {
tmp = ((((x * (18.0 * y)) * (z * t)) - t_2) + ((b * c) - (x * (4.0 * i)))) - t_1;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_1;
}
return tmp;
}
assert y < z;
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 * (27.0 * k);
double t_2 = t * (a * 4.0);
double t_3 = (((((((x * 18.0) * y) * z) * t) - t_2) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0));
double tmp;
if (t_3 <= -5e+246) {
tmp = ((((x * (18.0 * y)) * (z * t)) - t_2) + ((b * c) - (x * (4.0 * i)))) - t_1;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (27.0 * k) t_2 = t * (a * 4.0) t_3 = (((((((x * 18.0) * y) * z) * t) - t_2) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0)) tmp = 0 if t_3 <= -5e+246: tmp = ((((x * (18.0 * y)) * (z * t)) - t_2) + ((b * c) - (x * (4.0 * i)))) - t_1 elif t_3 <= math.inf: tmp = t_3 else: tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(27.0 * k)) t_2 = Float64(t * Float64(a * 4.0)) t_3 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - t_2) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(k * Float64(j * 27.0))) tmp = 0.0 if (t_3 <= -5e+246) tmp = Float64(Float64(Float64(Float64(Float64(x * Float64(18.0 * y)) * Float64(z * t)) - t_2) + Float64(Float64(b * c) - Float64(x * Float64(4.0 * i)))) - t_1); elseif (t_3 <= Inf) tmp = t_3; else tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) - t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (27.0 * k);
t_2 = t * (a * 4.0);
t_3 = (((((((x * 18.0) * y) * z) * t) - t_2) + (b * c)) - ((x * 4.0) * i)) - (k * (j * 27.0));
tmp = 0.0;
if (t_3 <= -5e+246)
tmp = ((((x * (18.0 * y)) * (z * t)) - t_2) + ((b * c) - (x * (4.0 * i)))) - t_1;
elseif (t_3 <= Inf)
tmp = t_3;
else
tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - t$95$2), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+246], N[(N[(N[(N[(N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$3, N[(N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(27 \cdot k\right)\\
t_2 := t \cdot \left(a \cdot 4\right)\\
t_3 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t_2\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_3 \leq -5 \cdot 10^{+246}:\\
\;\;\;\;\left(\left(\left(x \cdot \left(18 \cdot y\right)\right) \cdot \left(z \cdot t\right) - t_2\right) + \left(b \cdot c - x \cdot \left(4 \cdot i\right)\right)\right) - t_1\\
\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right) - t_1\\
\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)) < -4.99999999999999976e246Initial program 88.7%
associate-*l*88.7%
associate--l+88.7%
distribute-rgt-out--88.7%
associate-*l*90.1%
associate-*l*90.1%
Simplified90.1%
associate-*r*88.7%
distribute-rgt-out--88.7%
associate-*l*94.9%
associate-*l*94.9%
*-commutative94.9%
Applied egg-rr94.9%
if -4.99999999999999976e246 < (-.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 98.1%
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%
associate-*l*0.0%
associate--l+0.0%
distribute-rgt-out--17.4%
associate-*l*21.7%
associate-*l*21.7%
Simplified21.7%
associate-*r*17.4%
distribute-rgt-out--0.0%
associate-*l*4.3%
associate-*l*4.3%
*-commutative4.3%
Applied egg-rr4.3%
Taylor expanded in x around inf 65.2%
cancel-sign-sub-inv65.2%
associate-*r*65.2%
metadata-eval65.2%
*-commutative65.2%
Simplified65.2%
Final simplification94.2%
NOTE: y and z 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 (* k (* j -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (+ t_1 (* 18.0 (* t (* x (* y z)))))))
(if (<= (* b c) -7.7e+236)
t_2
(if (<= (* b c) -2.5e+97)
t_3
(if (<= (* b c) -2e+96)
t_2
(if (<= (* b c) -5.8e-44)
(+ (* j (* k -27.0)) (* a (* t -4.0)))
(if (<= (* b c) -5.9e-65)
t_3
(if (<= (* b c) 4.2e-283)
(+ t_1 (* x (* i -4.0)))
(if (<= (* b c) 8e-54)
t_3
(if (<= (* b c) 1.1e+57)
(* -4.0 (+ (* x i) (* t a)))
(- (* b c) (* 27.0 (* j k)))))))))))))assert(y < z);
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 = k * (j * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t_1 + (18.0 * (t * (x * (y * z))));
double tmp;
if ((b * c) <= -7.7e+236) {
tmp = t_2;
} else if ((b * c) <= -2.5e+97) {
tmp = t_3;
} else if ((b * c) <= -2e+96) {
tmp = t_2;
} else if ((b * c) <= -5.8e-44) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if ((b * c) <= -5.9e-65) {
tmp = t_3;
} else if ((b * c) <= 4.2e-283) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 8e-54) {
tmp = t_3;
} else if ((b * c) <= 1.1e+57) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: y and z 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 = k * (j * (-27.0d0))
t_2 = (b * c) + t_1
t_3 = t_1 + (18.0d0 * (t * (x * (y * z))))
if ((b * c) <= (-7.7d+236)) then
tmp = t_2
else if ((b * c) <= (-2.5d+97)) then
tmp = t_3
else if ((b * c) <= (-2d+96)) then
tmp = t_2
else if ((b * c) <= (-5.8d-44)) then
tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
else if ((b * c) <= (-5.9d-65)) then
tmp = t_3
else if ((b * c) <= 4.2d-283) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if ((b * c) <= 8d-54) then
tmp = t_3
else if ((b * c) <= 1.1d+57) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert y < z;
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 = k * (j * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t_1 + (18.0 * (t * (x * (y * z))));
double tmp;
if ((b * c) <= -7.7e+236) {
tmp = t_2;
} else if ((b * c) <= -2.5e+97) {
tmp = t_3;
} else if ((b * c) <= -2e+96) {
tmp = t_2;
} else if ((b * c) <= -5.8e-44) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if ((b * c) <= -5.9e-65) {
tmp = t_3;
} else if ((b * c) <= 4.2e-283) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 8e-54) {
tmp = t_3;
} else if ((b * c) <= 1.1e+57) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = (b * c) + t_1 t_3 = t_1 + (18.0 * (t * (x * (y * z)))) tmp = 0 if (b * c) <= -7.7e+236: tmp = t_2 elif (b * c) <= -2.5e+97: tmp = t_3 elif (b * c) <= -2e+96: tmp = t_2 elif (b * c) <= -5.8e-44: tmp = (j * (k * -27.0)) + (a * (t * -4.0)) elif (b * c) <= -5.9e-65: tmp = t_3 elif (b * c) <= 4.2e-283: tmp = t_1 + (x * (i * -4.0)) elif (b * c) <= 8e-54: tmp = t_3 elif (b * c) <= 1.1e+57: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))) tmp = 0.0 if (Float64(b * c) <= -7.7e+236) tmp = t_2; elseif (Float64(b * c) <= -2.5e+97) tmp = t_3; elseif (Float64(b * c) <= -2e+96) tmp = t_2; elseif (Float64(b * c) <= -5.8e-44) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0))); elseif (Float64(b * c) <= -5.9e-65) tmp = t_3; elseif (Float64(b * c) <= 4.2e-283) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 8e-54) tmp = t_3; elseif (Float64(b * c) <= 1.1e+57) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
t_2 = (b * c) + t_1;
t_3 = t_1 + (18.0 * (t * (x * (y * z))));
tmp = 0.0;
if ((b * c) <= -7.7e+236)
tmp = t_2;
elseif ((b * c) <= -2.5e+97)
tmp = t_3;
elseif ((b * c) <= -2e+96)
tmp = t_2;
elseif ((b * c) <= -5.8e-44)
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
elseif ((b * c) <= -5.9e-65)
tmp = t_3;
elseif ((b * c) <= 4.2e-283)
tmp = t_1 + (x * (i * -4.0));
elseif ((b * c) <= 8e-54)
tmp = t_3;
elseif ((b * c) <= 1.1e+57)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7.7e+236], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -2.5e+97], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -2e+96], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5.8e-44], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.9e-65], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 4.2e-283], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8e-54], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.1e+57], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
t_3 := t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -7.7 \cdot 10^{+236}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{+97}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{+96}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -5.8 \cdot 10^{-44}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -5.9 \cdot 10^{-65}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot c \leq 4.2 \cdot 10^{-283}:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 8 \cdot 10^{-54}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot c \leq 1.1 \cdot 10^{+57}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -7.70000000000000035e236 or -2.49999999999999999e97 < (*.f64 b c) < -2.0000000000000001e96Initial program 83.0%
Simplified86.5%
Taylor expanded in b around inf 89.6%
if -7.70000000000000035e236 < (*.f64 b c) < -2.49999999999999999e97 or -5.8000000000000003e-44 < (*.f64 b c) < -5.89999999999999978e-65 or 4.19999999999999994e-283 < (*.f64 b c) < 8.0000000000000002e-54Initial program 95.2%
Simplified95.4%
Taylor expanded in z around inf 67.6%
if -2.0000000000000001e96 < (*.f64 b c) < -5.8000000000000003e-44Initial program 88.3%
Taylor expanded in x around 0 74.0%
Taylor expanded in b around 0 65.5%
mul-1-neg65.5%
+-commutative65.5%
*-commutative65.5%
associate-*r*65.5%
*-commutative65.5%
distribute-neg-in65.5%
distribute-rgt-neg-in65.5%
*-commutative65.5%
distribute-lft-neg-in65.5%
metadata-eval65.5%
associate-*l*65.6%
distribute-lft-neg-in65.6%
metadata-eval65.6%
associate-*l*65.5%
*-commutative65.5%
associate-*r*65.5%
*-commutative65.5%
associate-*l*65.5%
Simplified65.5%
if -5.89999999999999978e-65 < (*.f64 b c) < 4.19999999999999994e-283Initial program 83.9%
Simplified85.3%
Taylor expanded in i around inf 57.0%
associate-*r*57.0%
*-commutative57.0%
Simplified57.0%
if 8.0000000000000002e-54 < (*.f64 b c) < 1.1e57Initial program 89.0%
associate-*l*89.0%
associate--l+89.0%
distribute-rgt-out--92.7%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in y around 0 72.1%
Taylor expanded in j around 0 65.3%
Taylor expanded in b around 0 65.3%
cancel-sign-sub-inv65.3%
*-commutative65.3%
metadata-eval65.3%
*-commutative65.3%
distribute-lft-out65.3%
*-commutative65.3%
Simplified65.3%
if 1.1e57 < (*.f64 b c) Initial program 82.5%
Taylor expanded in x around 0 80.8%
Taylor expanded in a around 0 76.9%
Final simplification68.4%
NOTE: y and z 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 (* k (* j -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (+ t_1 (* 18.0 (* t (* x (* y z)))))))
(if (<= (* b c) -7.7e+236)
t_2
(if (<= (* b c) -3.1e+97)
t_3
(if (<= (* b c) -2.5e+96)
t_2
(if (<= (* b c) -9.5e-45)
(+ (* j (* k -27.0)) (* a (* t -4.0)))
(if (<= (* b c) -8.5e-62)
t_3
(if (<= (* b c) 1.52e-282)
(+ t_1 (* x (* i -4.0)))
(if (<= (* b c) 2e-53)
(+ t_1 (* 18.0 (* (* y z) (* x t))))
(if (<= (* b c) 8.2e+56)
(* -4.0 (+ (* x i) (* t a)))
(- (* b c) (* 27.0 (* j k)))))))))))))assert(y < z);
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 = k * (j * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t_1 + (18.0 * (t * (x * (y * z))));
double tmp;
if ((b * c) <= -7.7e+236) {
tmp = t_2;
} else if ((b * c) <= -3.1e+97) {
tmp = t_3;
} else if ((b * c) <= -2.5e+96) {
tmp = t_2;
} else if ((b * c) <= -9.5e-45) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if ((b * c) <= -8.5e-62) {
tmp = t_3;
} else if ((b * c) <= 1.52e-282) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 2e-53) {
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
} else if ((b * c) <= 8.2e+56) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: y and z 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 = k * (j * (-27.0d0))
t_2 = (b * c) + t_1
t_3 = t_1 + (18.0d0 * (t * (x * (y * z))))
if ((b * c) <= (-7.7d+236)) then
tmp = t_2
else if ((b * c) <= (-3.1d+97)) then
tmp = t_3
else if ((b * c) <= (-2.5d+96)) then
tmp = t_2
else if ((b * c) <= (-9.5d-45)) then
tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
else if ((b * c) <= (-8.5d-62)) then
tmp = t_3
else if ((b * c) <= 1.52d-282) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if ((b * c) <= 2d-53) then
tmp = t_1 + (18.0d0 * ((y * z) * (x * t)))
else if ((b * c) <= 8.2d+56) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert y < z;
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 = k * (j * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t_1 + (18.0 * (t * (x * (y * z))));
double tmp;
if ((b * c) <= -7.7e+236) {
tmp = t_2;
} else if ((b * c) <= -3.1e+97) {
tmp = t_3;
} else if ((b * c) <= -2.5e+96) {
tmp = t_2;
} else if ((b * c) <= -9.5e-45) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if ((b * c) <= -8.5e-62) {
tmp = t_3;
} else if ((b * c) <= 1.52e-282) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 2e-53) {
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
} else if ((b * c) <= 8.2e+56) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = (b * c) + t_1 t_3 = t_1 + (18.0 * (t * (x * (y * z)))) tmp = 0 if (b * c) <= -7.7e+236: tmp = t_2 elif (b * c) <= -3.1e+97: tmp = t_3 elif (b * c) <= -2.5e+96: tmp = t_2 elif (b * c) <= -9.5e-45: tmp = (j * (k * -27.0)) + (a * (t * -4.0)) elif (b * c) <= -8.5e-62: tmp = t_3 elif (b * c) <= 1.52e-282: tmp = t_1 + (x * (i * -4.0)) elif (b * c) <= 2e-53: tmp = t_1 + (18.0 * ((y * z) * (x * t))) elif (b * c) <= 8.2e+56: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))) tmp = 0.0 if (Float64(b * c) <= -7.7e+236) tmp = t_2; elseif (Float64(b * c) <= -3.1e+97) tmp = t_3; elseif (Float64(b * c) <= -2.5e+96) tmp = t_2; elseif (Float64(b * c) <= -9.5e-45) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0))); elseif (Float64(b * c) <= -8.5e-62) tmp = t_3; elseif (Float64(b * c) <= 1.52e-282) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 2e-53) tmp = Float64(t_1 + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)))); elseif (Float64(b * c) <= 8.2e+56) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
t_2 = (b * c) + t_1;
t_3 = t_1 + (18.0 * (t * (x * (y * z))));
tmp = 0.0;
if ((b * c) <= -7.7e+236)
tmp = t_2;
elseif ((b * c) <= -3.1e+97)
tmp = t_3;
elseif ((b * c) <= -2.5e+96)
tmp = t_2;
elseif ((b * c) <= -9.5e-45)
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
elseif ((b * c) <= -8.5e-62)
tmp = t_3;
elseif ((b * c) <= 1.52e-282)
tmp = t_1 + (x * (i * -4.0));
elseif ((b * c) <= 2e-53)
tmp = t_1 + (18.0 * ((y * z) * (x * t)));
elseif ((b * c) <= 8.2e+56)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -7.7e+236], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -3.1e+97], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], -2.5e+96], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -9.5e-45], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -8.5e-62], t$95$3, If[LessEqual[N[(b * c), $MachinePrecision], 1.52e-282], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e-53], N[(t$95$1 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e+56], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
t_3 := t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -7.7 \cdot 10^{+236}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -3.1 \cdot 10^{+97}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot c \leq -2.5 \cdot 10^{+96}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-45}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-62}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \cdot c \leq 1.52 \cdot 10^{-282}:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{-53}:\\
\;\;\;\;t_1 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{+56}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -7.70000000000000035e236 or -3.09999999999999981e97 < (*.f64 b c) < -2.5000000000000002e96Initial program 83.0%
Simplified86.5%
Taylor expanded in b around inf 89.6%
if -7.70000000000000035e236 < (*.f64 b c) < -3.09999999999999981e97 or -9.5000000000000002e-45 < (*.f64 b c) < -8.4999999999999995e-62Initial program 94.4%
Simplified99.9%
Taylor expanded in z around inf 72.7%
if -2.5000000000000002e96 < (*.f64 b c) < -9.5000000000000002e-45Initial program 88.3%
Taylor expanded in x around 0 74.0%
Taylor expanded in b around 0 65.5%
mul-1-neg65.5%
+-commutative65.5%
*-commutative65.5%
associate-*r*65.5%
*-commutative65.5%
distribute-neg-in65.5%
distribute-rgt-neg-in65.5%
*-commutative65.5%
distribute-lft-neg-in65.5%
metadata-eval65.5%
associate-*l*65.6%
distribute-lft-neg-in65.6%
metadata-eval65.6%
associate-*l*65.5%
*-commutative65.5%
associate-*r*65.5%
*-commutative65.5%
associate-*l*65.5%
Simplified65.5%
if -8.4999999999999995e-62 < (*.f64 b c) < 1.52e-282Initial program 83.9%
Simplified85.3%
Taylor expanded in i around inf 57.0%
associate-*r*57.0%
*-commutative57.0%
Simplified57.0%
if 1.52e-282 < (*.f64 b c) < 2.00000000000000006e-53Initial program 95.8%
Simplified91.9%
Taylor expanded in z around inf 63.8%
associate-*r*67.8%
Simplified67.8%
if 2.00000000000000006e-53 < (*.f64 b c) < 8.2000000000000007e56Initial program 89.0%
associate-*l*89.0%
associate--l+89.0%
distribute-rgt-out--92.7%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in y around 0 72.1%
Taylor expanded in j around 0 65.3%
Taylor expanded in b around 0 65.3%
cancel-sign-sub-inv65.3%
*-commutative65.3%
metadata-eval65.3%
*-commutative65.3%
distribute-lft-out65.3%
*-commutative65.3%
Simplified65.3%
if 8.2000000000000007e56 < (*.f64 b c) Initial program 82.5%
Taylor expanded in x around 0 80.8%
Taylor expanded in a around 0 76.9%
Final simplification68.8%
NOTE: y and z 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 (* k (* j -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= (* b c) -6.2e+236)
t_2
(if (<= (* b c) -9.8e+98)
(+ t_1 (* 18.0 (* t (* x (* y z)))))
(if (<= (* b c) -3e+96)
t_2
(if (<= (* b c) -4.2e-45)
(+ (* j (* k -27.0)) (* a (* t -4.0)))
(if (<= (* b c) 9.8e-80)
(+ t_1 (* x (* 18.0 (* z (* y t)))))
(if (<= (* b c) 1.42e+56)
(* -4.0 (+ (* x i) (* t a)))
(- (* b c) (* 27.0 (* j k)))))))))))assert(y < z);
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 = k * (j * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if ((b * c) <= -6.2e+236) {
tmp = t_2;
} else if ((b * c) <= -9.8e+98) {
tmp = t_1 + (18.0 * (t * (x * (y * z))));
} else if ((b * c) <= -3e+96) {
tmp = t_2;
} else if ((b * c) <= -4.2e-45) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if ((b * c) <= 9.8e-80) {
tmp = t_1 + (x * (18.0 * (z * (y * t))));
} else if ((b * c) <= 1.42e+56) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: y and z 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 = k * (j * (-27.0d0))
t_2 = (b * c) + t_1
if ((b * c) <= (-6.2d+236)) then
tmp = t_2
else if ((b * c) <= (-9.8d+98)) then
tmp = t_1 + (18.0d0 * (t * (x * (y * z))))
else if ((b * c) <= (-3d+96)) then
tmp = t_2
else if ((b * c) <= (-4.2d-45)) then
tmp = (j * (k * (-27.0d0))) + (a * (t * (-4.0d0)))
else if ((b * c) <= 9.8d-80) then
tmp = t_1 + (x * (18.0d0 * (z * (y * t))))
else if ((b * c) <= 1.42d+56) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert y < z;
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 = k * (j * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if ((b * c) <= -6.2e+236) {
tmp = t_2;
} else if ((b * c) <= -9.8e+98) {
tmp = t_1 + (18.0 * (t * (x * (y * z))));
} else if ((b * c) <= -3e+96) {
tmp = t_2;
} else if ((b * c) <= -4.2e-45) {
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
} else if ((b * c) <= 9.8e-80) {
tmp = t_1 + (x * (18.0 * (z * (y * t))));
} else if ((b * c) <= 1.42e+56) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = (b * c) + t_1 tmp = 0 if (b * c) <= -6.2e+236: tmp = t_2 elif (b * c) <= -9.8e+98: tmp = t_1 + (18.0 * (t * (x * (y * z)))) elif (b * c) <= -3e+96: tmp = t_2 elif (b * c) <= -4.2e-45: tmp = (j * (k * -27.0)) + (a * (t * -4.0)) elif (b * c) <= 9.8e-80: tmp = t_1 + (x * (18.0 * (z * (y * t)))) elif (b * c) <= 1.42e+56: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (Float64(b * c) <= -6.2e+236) tmp = t_2; elseif (Float64(b * c) <= -9.8e+98) tmp = Float64(t_1 + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); elseif (Float64(b * c) <= -3e+96) tmp = t_2; elseif (Float64(b * c) <= -4.2e-45) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(a * Float64(t * -4.0))); elseif (Float64(b * c) <= 9.8e-80) tmp = Float64(t_1 + Float64(x * Float64(18.0 * Float64(z * Float64(y * t))))); elseif (Float64(b * c) <= 1.42e+56) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
t_2 = (b * c) + t_1;
tmp = 0.0;
if ((b * c) <= -6.2e+236)
tmp = t_2;
elseif ((b * c) <= -9.8e+98)
tmp = t_1 + (18.0 * (t * (x * (y * z))));
elseif ((b * c) <= -3e+96)
tmp = t_2;
elseif ((b * c) <= -4.2e-45)
tmp = (j * (k * -27.0)) + (a * (t * -4.0));
elseif ((b * c) <= 9.8e-80)
tmp = t_1 + (x * (18.0 * (z * (y * t))));
elseif ((b * c) <= 1.42e+56)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+236], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -9.8e+98], N[(t$95$1 + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3e+96], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -4.2e-45], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.8e-80], N[(t$95$1 + N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.42e+56], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+236}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -9.8 \cdot 10^{+98}:\\
\;\;\;\;t_1 + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -3 \cdot 10^{+96}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -4.2 \cdot 10^{-45}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{-80}:\\
\;\;\;\;t_1 + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 1.42 \cdot 10^{+56}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -6.19999999999999999e236 or -9.79999999999999958e98 < (*.f64 b c) < -3e96Initial program 83.0%
Simplified86.5%
Taylor expanded in b around inf 89.6%
if -6.19999999999999999e236 < (*.f64 b c) < -9.79999999999999958e98Initial program 99.9%
Simplified99.9%
Taylor expanded in z around inf 69.2%
if -3e96 < (*.f64 b c) < -4.1999999999999999e-45Initial program 88.3%
Taylor expanded in x around 0 74.0%
Taylor expanded in b around 0 65.5%
mul-1-neg65.5%
+-commutative65.5%
*-commutative65.5%
associate-*r*65.5%
*-commutative65.5%
distribute-neg-in65.5%
distribute-rgt-neg-in65.5%
*-commutative65.5%
distribute-lft-neg-in65.5%
metadata-eval65.5%
associate-*l*65.6%
distribute-lft-neg-in65.6%
metadata-eval65.6%
associate-*l*65.5%
*-commutative65.5%
associate-*r*65.5%
*-commutative65.5%
associate-*l*65.5%
Simplified65.5%
if -4.1999999999999999e-45 < (*.f64 b c) < 9.79999999999999981e-80Initial program 85.8%
Simplified86.9%
Taylor expanded in z around inf 52.5%
*-commutative52.5%
*-commutative52.5%
associate-*l*55.4%
*-commutative55.4%
associate-*r*56.4%
associate-*l*56.4%
*-commutative56.4%
*-commutative56.4%
associate-*r*56.4%
*-commutative56.4%
*-commutative56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in t around 0 56.4%
associate-*r*57.4%
Simplified57.4%
if 9.79999999999999981e-80 < (*.f64 b c) < 1.42e56Initial program 89.8%
associate-*l*89.8%
associate--l+89.8%
distribute-rgt-out--93.2%
associate-*l*93.2%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in y around 0 71.9%
Taylor expanded in j around 0 64.3%
Taylor expanded in b around 0 64.3%
cancel-sign-sub-inv64.3%
*-commutative64.3%
metadata-eval64.3%
*-commutative64.3%
distribute-lft-out64.3%
*-commutative64.3%
Simplified64.3%
if 1.42e56 < (*.f64 b c) Initial program 82.5%
Taylor expanded in x around 0 80.8%
Taylor expanded in a around 0 76.9%
Final simplification67.5%
NOTE: y and z 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) (* x (* 4.0 i)))) (t_2 (* j (* 27.0 k))))
(if (<= t -1.76e+104)
(- (* t (- (* a (- 4.0)) (* (* z (* x y)) -18.0))) t_2)
(if (<= t 3e+64)
(- (+ t_1 (- (* (* z t) (* 18.0 (* x y))) (* t (* a 4.0)))) t_2)
(- (+ t_1 (* t (- (* (* x 18.0) (* y z)) (* a 4.0)))) t_2)))))assert(y < z);
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) - (x * (4.0 * i));
double t_2 = j * (27.0 * k);
double tmp;
if (t <= -1.76e+104) {
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_2;
} else if (t <= 3e+64) {
tmp = (t_1 + (((z * t) * (18.0 * (x * y))) - (t * (a * 4.0)))) - t_2;
} else {
tmp = (t_1 + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_2;
}
return tmp;
}
NOTE: y and z 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) - (x * (4.0d0 * i))
t_2 = j * (27.0d0 * k)
if (t <= (-1.76d+104)) then
tmp = (t * ((a * -4.0d0) - ((z * (x * y)) * (-18.0d0)))) - t_2
else if (t <= 3d+64) then
tmp = (t_1 + (((z * t) * (18.0d0 * (x * y))) - (t * (a * 4.0d0)))) - t_2
else
tmp = (t_1 + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - t_2
end if
code = tmp
end function
assert y < z;
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) - (x * (4.0 * i));
double t_2 = j * (27.0 * k);
double tmp;
if (t <= -1.76e+104) {
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_2;
} else if (t <= 3e+64) {
tmp = (t_1 + (((z * t) * (18.0 * (x * y))) - (t * (a * 4.0)))) - t_2;
} else {
tmp = (t_1 + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_2;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (x * (4.0 * i)) t_2 = j * (27.0 * k) tmp = 0 if t <= -1.76e+104: tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_2 elif t <= 3e+64: tmp = (t_1 + (((z * t) * (18.0 * (x * y))) - (t * (a * 4.0)))) - t_2 else: tmp = (t_1 + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_2 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))) t_2 = Float64(j * Float64(27.0 * k)) tmp = 0.0 if (t <= -1.76e+104) tmp = Float64(Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.0))) - t_2); elseif (t <= 3e+64) tmp = Float64(Float64(t_1 + Float64(Float64(Float64(z * t) * Float64(18.0 * Float64(x * y))) - Float64(t * Float64(a * 4.0)))) - t_2); else tmp = Float64(Float64(t_1 + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - t_2); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (x * (4.0 * i));
t_2 = j * (27.0 * k);
tmp = 0.0;
if (t <= -1.76e+104)
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_2;
elseif (t <= 3e+64)
tmp = (t_1 + (((z * t) * (18.0 * (x * y))) - (t * (a * 4.0)))) - t_2;
else
tmp = (t_1 + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - t_2;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.76e+104], N[(N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 3e+64], N[(N[(t$95$1 + N[(N[(N[(z * t), $MachinePrecision] * N[(18.0 * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(t$95$1 + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - x \cdot \left(4 \cdot i\right)\\
t_2 := j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t \leq -1.76 \cdot 10^{+104}:\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right) - t_2\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+64}:\\
\;\;\;\;\left(t_1 + \left(\left(z \cdot t\right) \cdot \left(18 \cdot \left(x \cdot y\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - t_2\\
\mathbf{else}:\\
\;\;\;\;\left(t_1 + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - t_2\\
\end{array}
\end{array}
if t < -1.75999999999999994e104Initial program 80.0%
associate-*l*80.0%
associate--l+80.0%
distribute-rgt-out--82.8%
associate-*l*82.8%
associate-*l*82.8%
Simplified82.8%
associate-*r*82.8%
distribute-rgt-out--80.0%
associate-*l*74.3%
associate-*l*74.2%
*-commutative74.2%
Applied egg-rr74.2%
Taylor expanded in t around -inf 86.7%
associate-*r*86.7%
neg-mul-186.7%
cancel-sign-sub-inv86.7%
*-commutative86.7%
associate-*r*86.7%
metadata-eval86.7%
Simplified86.7%
if -1.75999999999999994e104 < t < 3.0000000000000002e64Initial program 88.3%
associate-*l*88.2%
associate--l+88.2%
distribute-rgt-out--88.2%
associate-*l*87.2%
associate-*l*87.2%
Simplified87.2%
associate-*r*88.2%
distribute-rgt-out--88.2%
associate-*l*92.8%
associate-*l*92.8%
*-commutative92.8%
Applied egg-rr92.8%
Taylor expanded in x around 0 87.2%
*-commutative87.2%
associate-*l*87.2%
*-commutative87.2%
associate-*l*87.2%
*-commutative87.2%
associate-*l*88.2%
associate-*r*88.2%
*-commutative88.2%
associate-*l*92.8%
*-commutative92.8%
associate-*l*92.8%
*-commutative92.8%
Simplified92.8%
if 3.0000000000000002e64 < t Initial program 85.3%
associate-*l*85.3%
associate--l+85.3%
distribute-rgt-out--90.9%
associate-*l*92.6%
associate-*l*92.6%
Simplified92.6%
Final simplification91.9%
NOTE: y and z 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) 2.15e+215)
(-
(+ (- (* b c) (* x (* 4.0 i))) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(* j (* 27.0 k)))
(+ (* b c) (* k (* j -27.0)))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 2.15e+215) {
tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (j * (27.0 * k));
} else {
tmp = (b * c) + (k * (j * -27.0));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= 2.15d+215) then
tmp = (((b * c) - (x * (4.0d0 * i))) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - (j * (27.0d0 * k))
else
tmp = (b * c) + (k * (j * (-27.0d0)))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 2.15e+215) {
tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (j * (27.0 * k));
} else {
tmp = (b * c) + (k * (j * -27.0));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= 2.15e+215: tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (j * (27.0 * k)) else: tmp = (b * c) + (k * (j * -27.0)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= 2.15e+215) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(j * Float64(27.0 * k))); else tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= 2.15e+215)
tmp = (((b * c) - (x * (4.0 * i))) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - (j * (27.0 * k));
else
tmp = (b * c) + (k * (j * -27.0));
end
tmp_2 = tmp;
end
NOTE: y and z 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], 2.15e+215], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq 2.15 \cdot 10^{+215}:\\
\;\;\;\;\left(\left(b \cdot c - x \cdot \left(4 \cdot i\right)\right) + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < 2.1500000000000002e215Initial program 88.3%
associate-*l*88.3%
associate--l+88.3%
distribute-rgt-out--90.1%
associate-*l*89.3%
associate-*l*89.3%
Simplified89.3%
if 2.1500000000000002e215 < (*.f64 b c) Initial program 71.4%
Simplified78.6%
Taylor expanded in b around inf 89.3%
Final simplification89.3%
NOTE: y and z 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 (* k (* j 27.0))))
(if (<= t_2 -5e+48)
(- (- (* b c) t_1) (* j (* 27.0 k)))
(if (<= t_2 1e+131)
(- (+ (* b c) (* -4.0 (* t a))) t_1)
(- (- (* b c) (* 4.0 (* t a))) t_2)))))assert(y < z);
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -5e+48) {
tmp = ((b * c) - t_1) - (j * (27.0 * k));
} else if (t_2 <= 1e+131) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_2;
}
return tmp;
}
NOTE: y and z 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 = k * (j * 27.0d0)
if (t_2 <= (-5d+48)) then
tmp = ((b * c) - t_1) - (j * (27.0d0 * k))
else if (t_2 <= 1d+131) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else
tmp = ((b * c) - (4.0d0 * (t * a))) - t_2
end if
code = tmp
end function
assert y < z;
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 = k * (j * 27.0);
double tmp;
if (t_2 <= -5e+48) {
tmp = ((b * c) - t_1) - (j * (27.0 * k));
} else if (t_2 <= 1e+131) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (t * a))) - t_2;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = k * (j * 27.0) tmp = 0 if t_2 <= -5e+48: tmp = ((b * c) - t_1) - (j * (27.0 * k)) elif t_2 <= 1e+131: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 else: tmp = ((b * c) - (4.0 * (t * a))) - t_2 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(k * Float64(j * 27.0)) tmp = 0.0 if (t_2 <= -5e+48) tmp = Float64(Float64(Float64(b * c) - t_1) - Float64(j * Float64(27.0 * k))); elseif (t_2 <= 1e+131) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_2); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 4.0 * (x * i);
t_2 = k * (j * 27.0);
tmp = 0.0;
if (t_2 <= -5e+48)
tmp = ((b * c) - t_1) - (j * (27.0 * k));
elseif (t_2 <= 1e+131)
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
else
tmp = ((b * c) - (4.0 * (t * a))) - t_2;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+48], N[(N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+131], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := k \cdot \left(j \cdot 27\right)\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+48}:\\
\;\;\;\;\left(b \cdot c - t_1\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{elif}\;t_2 \leq 10^{+131}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -4.99999999999999973e48Initial program 87.8%
associate-*l*87.9%
associate--l+87.9%
distribute-rgt-out--89.6%
associate-*l*89.7%
associate-*l*89.7%
Simplified89.7%
Taylor expanded in t around 0 77.0%
if -4.99999999999999973e48 < (*.f64 (*.f64 j 27) k) < 9.9999999999999991e130Initial program 86.3%
associate-*l*86.3%
associate--l+86.3%
distribute-rgt-out--87.6%
associate-*l*87.6%
associate-*l*87.6%
Simplified87.6%
Taylor expanded in y around 0 72.3%
Taylor expanded in j around 0 69.3%
if 9.9999999999999991e130 < (*.f64 (*.f64 j 27) k) Initial program 85.3%
Taylor expanded in x around 0 75.9%
Final simplification72.1%
NOTE: y and z 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 (* y z)) (* 18.0 t)) (* j (* k -27.0))))
(t_2 (- (+ (* b c) (* -4.0 (* t a))) (* 4.0 (* x i)))))
(if (<= x -2.6e+155)
t_1
(if (<= x -1.12e+35)
t_2
(if (<= x -1.12e-31)
t_1
(if (<= x 9.5e-76)
(- (- (* b c) (* 4.0 (* t a))) (* k (* j 27.0)))
(if (<= x 8.2e+113)
t_2
(+ (* k (* j -27.0)) (* x (* 18.0 (* z (* y t))))))))))))assert(y < z);
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 * (y * z)) * (18.0 * t)) + (j * (k * -27.0));
double t_2 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
double tmp;
if (x <= -2.6e+155) {
tmp = t_1;
} else if (x <= -1.12e+35) {
tmp = t_2;
} else if (x <= -1.12e-31) {
tmp = t_1;
} else if (x <= 9.5e-76) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else if (x <= 8.2e+113) {
tmp = t_2;
} else {
tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * (y * z)) * (18.0d0 * t)) + (j * (k * (-27.0d0)))
t_2 = ((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))
if (x <= (-2.6d+155)) then
tmp = t_1
else if (x <= (-1.12d+35)) then
tmp = t_2
else if (x <= (-1.12d-31)) then
tmp = t_1
else if (x <= 9.5d-76) then
tmp = ((b * c) - (4.0d0 * (t * a))) - (k * (j * 27.0d0))
else if (x <= 8.2d+113) then
tmp = t_2
else
tmp = (k * (j * (-27.0d0))) + (x * (18.0d0 * (z * (y * t))))
end if
code = tmp
end function
assert y < z;
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 * (y * z)) * (18.0 * t)) + (j * (k * -27.0));
double t_2 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
double tmp;
if (x <= -2.6e+155) {
tmp = t_1;
} else if (x <= -1.12e+35) {
tmp = t_2;
} else if (x <= -1.12e-31) {
tmp = t_1;
} else if (x <= 9.5e-76) {
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
} else if (x <= 8.2e+113) {
tmp = t_2;
} else {
tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((x * (y * z)) * (18.0 * t)) + (j * (k * -27.0)) t_2 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i)) tmp = 0 if x <= -2.6e+155: tmp = t_1 elif x <= -1.12e+35: tmp = t_2 elif x <= -1.12e-31: tmp = t_1 elif x <= 9.5e-76: tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0)) elif x <= 8.2e+113: tmp = t_2 else: tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t)))) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(x * Float64(y * z)) * Float64(18.0 * t)) + Float64(j * Float64(k * -27.0))) t_2 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (x <= -2.6e+155) tmp = t_1; elseif (x <= -1.12e+35) tmp = t_2; elseif (x <= -1.12e-31) tmp = t_1; elseif (x <= 9.5e-76) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(k * Float64(j * 27.0))); elseif (x <= 8.2e+113) tmp = t_2; else tmp = Float64(Float64(k * Float64(j * -27.0)) + Float64(x * Float64(18.0 * Float64(z * Float64(y * t))))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((x * (y * z)) * (18.0 * t)) + (j * (k * -27.0));
t_2 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
tmp = 0.0;
if (x <= -2.6e+155)
tmp = t_1;
elseif (x <= -1.12e+35)
tmp = t_2;
elseif (x <= -1.12e-31)
tmp = t_1;
elseif (x <= 9.5e-76)
tmp = ((b * c) - (4.0 * (t * a))) - (k * (j * 27.0));
elseif (x <= 8.2e+113)
tmp = t_2;
else
tmp = (k * (j * -27.0)) + (x * (18.0 * (z * (y * t))));
end
tmp_2 = tmp;
end
NOTE: y and z 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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.6e+155], t$95$1, If[LessEqual[x, -1.12e+35], t$95$2, If[LessEqual[x, -1.12e-31], t$95$1, If[LessEqual[x, 9.5e-76], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(k * N[(j * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.2e+113], t$95$2, N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z\right)\right) \cdot \left(18 \cdot t\right) + j \cdot \left(k \cdot -27\right)\\
t_2 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;x \leq -2.6 \cdot 10^{+155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.12 \cdot 10^{+35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.12 \cdot 10^{-31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-76}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - k \cdot \left(j \cdot 27\right)\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+113}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right) + x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.6000000000000002e155 or -1.12000000000000003e35 < x < -1.12e-31Initial program 77.5%
Simplified84.5%
+-commutative84.5%
*-commutative84.5%
fma-def86.2%
associate-*r*86.2%
associate-*r*86.2%
Applied egg-rr86.2%
Taylor expanded in z around inf 72.3%
associate-*r*72.4%
associate-*r*70.6%
Simplified70.6%
fma-udef68.9%
associate-*r*68.8%
*-commutative68.8%
associate-*l*70.6%
Applied egg-rr70.6%
if -2.6000000000000002e155 < x < -1.12000000000000003e35 or 9.49999999999999984e-76 < x < 8.19999999999999985e113Initial program 83.0%
associate-*l*83.0%
associate--l+83.0%
distribute-rgt-out--85.9%
associate-*l*87.3%
associate-*l*87.3%
Simplified87.3%
Taylor expanded in y around 0 78.9%
Taylor expanded in j around 0 71.5%
if -1.12e-31 < x < 9.49999999999999984e-76Initial program 96.6%
Taylor expanded in x around 0 82.5%
if 8.19999999999999985e113 < x Initial program 81.7%
Simplified86.7%
Taylor expanded in z around inf 68.7%
*-commutative68.7%
*-commutative68.7%
associate-*l*71.4%
*-commutative71.4%
associate-*r*71.5%
associate-*l*71.4%
*-commutative71.4%
*-commutative71.4%
associate-*r*71.4%
*-commutative71.4%
*-commutative71.4%
*-commutative71.4%
Simplified71.4%
Taylor expanded in t around 0 71.5%
associate-*r*71.5%
Simplified71.5%
Final simplification75.3%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= (* b c) -1.3e+110)
(and (not (<= (* b c) -4.5e+17))
(or (<= (* b c) -1.1e-29) (not (<= (* b c) 3.7e+56)))))
(+ (* b c) (* k (* j -27.0)))
(* -4.0 (+ (* x i) (* t a)))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.3e+110) || (!((b * c) <= -4.5e+17) && (((b * c) <= -1.1e-29) || !((b * c) <= 3.7e+56)))) {
tmp = (b * c) + (k * (j * -27.0));
} else {
tmp = -4.0 * ((x * i) + (t * a));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.3d+110)) .or. (.not. ((b * c) <= (-4.5d+17))) .and. ((b * c) <= (-1.1d-29)) .or. (.not. ((b * c) <= 3.7d+56))) then
tmp = (b * c) + (k * (j * (-27.0d0)))
else
tmp = (-4.0d0) * ((x * i) + (t * a))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.3e+110) || (!((b * c) <= -4.5e+17) && (((b * c) <= -1.1e-29) || !((b * c) <= 3.7e+56)))) {
tmp = (b * c) + (k * (j * -27.0));
} else {
tmp = -4.0 * ((x * i) + (t * a));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.3e+110) or (not ((b * c) <= -4.5e+17) and (((b * c) <= -1.1e-29) or not ((b * c) <= 3.7e+56))): tmp = (b * c) + (k * (j * -27.0)) else: tmp = -4.0 * ((x * i) + (t * a)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.3e+110) || (!(Float64(b * c) <= -4.5e+17) && ((Float64(b * c) <= -1.1e-29) || !(Float64(b * c) <= 3.7e+56)))) tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); else tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (((b * c) <= -1.3e+110) || (~(((b * c) <= -4.5e+17)) && (((b * c) <= -1.1e-29) || ~(((b * c) <= 3.7e+56)))))
tmp = (b * c) + (k * (j * -27.0));
else
tmp = -4.0 * ((x * i) + (t * a));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.3e+110], And[N[Not[LessEqual[N[(b * c), $MachinePrecision], -4.5e+17]], $MachinePrecision], Or[LessEqual[N[(b * c), $MachinePrecision], -1.1e-29], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.7e+56]], $MachinePrecision]]]], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.3 \cdot 10^{+110} \lor \neg \left(b \cdot c \leq -4.5 \cdot 10^{+17}\right) \land \left(b \cdot c \leq -1.1 \cdot 10^{-29} \lor \neg \left(b \cdot c \leq 3.7 \cdot 10^{+56}\right)\right):\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.3e110 or -4.5e17 < (*.f64 b c) < -1.09999999999999995e-29 or 3.69999999999999997e56 < (*.f64 b c) Initial program 85.3%
Simplified87.3%
Taylor expanded in b around inf 77.7%
if -1.3e110 < (*.f64 b c) < -4.5e17 or -1.09999999999999995e-29 < (*.f64 b c) < 3.69999999999999997e56Initial program 87.3%
associate-*l*87.3%
associate--l+87.3%
distribute-rgt-out--89.9%
associate-*l*89.3%
associate-*l*89.3%
Simplified89.3%
Taylor expanded in y around 0 70.3%
Taylor expanded in j around 0 50.8%
Taylor expanded in b around 0 48.3%
cancel-sign-sub-inv48.3%
*-commutative48.3%
metadata-eval48.3%
*-commutative48.3%
distribute-lft-out48.3%
*-commutative48.3%
Simplified48.3%
Final simplification59.9%
NOTE: y and z 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 (* k (* j -27.0))))
(if (<= (* b c) -6.2e+236)
(+ (* b c) t_1)
(if (<= (* b c) -7e-44)
(+ t_1 (* -4.0 (* t a)))
(if (<= (* b c) 8.2e-54)
(+ t_1 (* x (* i -4.0)))
(if (<= (* b c) 8.2e+56)
(* -4.0 (+ (* x i) (* t a)))
(- (* b c) (* 27.0 (* j k)))))))))assert(y < z);
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 = k * (j * -27.0);
double tmp;
if ((b * c) <= -6.2e+236) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -7e-44) {
tmp = t_1 + (-4.0 * (t * a));
} else if ((b * c) <= 8.2e-54) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 8.2e+56) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
NOTE: y and z 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 = k * (j * (-27.0d0))
if ((b * c) <= (-6.2d+236)) then
tmp = (b * c) + t_1
else if ((b * c) <= (-7d-44)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if ((b * c) <= 8.2d-54) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if ((b * c) <= 8.2d+56) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert y < z;
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 = k * (j * -27.0);
double tmp;
if ((b * c) <= -6.2e+236) {
tmp = (b * c) + t_1;
} else if ((b * c) <= -7e-44) {
tmp = t_1 + (-4.0 * (t * a));
} else if ((b * c) <= 8.2e-54) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 8.2e+56) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if (b * c) <= -6.2e+236: tmp = (b * c) + t_1 elif (b * c) <= -7e-44: tmp = t_1 + (-4.0 * (t * a)) elif (b * c) <= 8.2e-54: tmp = t_1 + (x * (i * -4.0)) elif (b * c) <= 8.2e+56: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (Float64(b * c) <= -6.2e+236) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= -7e-44) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (Float64(b * c) <= 8.2e-54) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 8.2e+56) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if ((b * c) <= -6.2e+236)
tmp = (b * c) + t_1;
elseif ((b * c) <= -7e-44)
tmp = t_1 + (-4.0 * (t * a));
elseif ((b * c) <= 8.2e-54)
tmp = t_1 + (x * (i * -4.0));
elseif ((b * c) <= 8.2e+56)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = (b * c) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+236], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7e-44], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-54], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e+56], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+236}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-44}:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-54}:\\
\;\;\;\;t_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{+56}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -6.19999999999999999e236Initial program 81.8%
Simplified85.5%
Taylor expanded in b around inf 88.9%
if -6.19999999999999999e236 < (*.f64 b c) < -6.9999999999999995e-44Initial program 92.3%
Simplified94.4%
Taylor expanded in a around inf 59.0%
*-commutative59.0%
Simplified59.0%
if -6.9999999999999995e-44 < (*.f64 b c) < 8.2000000000000001e-54Initial program 86.1%
Simplified87.2%
Taylor expanded in i around inf 50.9%
associate-*r*50.9%
*-commutative50.9%
Simplified50.9%
if 8.2000000000000001e-54 < (*.f64 b c) < 8.2000000000000007e56Initial program 89.0%
associate-*l*89.0%
associate--l+89.0%
distribute-rgt-out--92.7%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in y around 0 72.1%
Taylor expanded in j around 0 65.3%
Taylor expanded in b around 0 65.3%
cancel-sign-sub-inv65.3%
*-commutative65.3%
metadata-eval65.3%
*-commutative65.3%
distribute-lft-out65.3%
*-commutative65.3%
Simplified65.3%
if 8.2000000000000007e56 < (*.f64 b c) Initial program 82.5%
Taylor expanded in x around 0 80.8%
Taylor expanded in a around 0 76.9%
Final simplification63.3%
NOTE: y and z 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 (* 27.0 k))))
(if (or (<= y -4.3e+133) (not (<= y 2.6e-148)))
(- (* x (+ (* 18.0 (* z (* y t))) (* i -4.0))) t_1)
(- (- (+ (* b c) (* -4.0 (* t a))) (* 4.0 (* x i))) t_1))))assert(y < z);
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 * (27.0 * k);
double tmp;
if ((y <= -4.3e+133) || !(y <= 2.6e-148)) {
tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_1;
} else {
tmp = (((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))) - t_1;
}
return tmp;
}
NOTE: y and z 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 * (27.0d0 * k)
if ((y <= (-4.3d+133)) .or. (.not. (y <= 2.6d-148))) then
tmp = (x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))) - t_1
else
tmp = (((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))) - t_1
end if
code = tmp
end function
assert y < z;
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 * (27.0 * k);
double tmp;
if ((y <= -4.3e+133) || !(y <= 2.6e-148)) {
tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_1;
} else {
tmp = (((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))) - t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (27.0 * k) tmp = 0 if (y <= -4.3e+133) or not (y <= 2.6e-148): tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_1 else: tmp = (((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))) - t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(27.0 * k)) tmp = 0.0 if ((y <= -4.3e+133) || !(y <= 2.6e-148)) tmp = Float64(Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) - t_1); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i))) - t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (27.0 * k);
tmp = 0.0;
if ((y <= -4.3e+133) || ~((y <= 2.6e-148)))
tmp = (x * ((18.0 * (z * (y * t))) + (i * -4.0))) - t_1;
else
tmp = (((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i))) - t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[y, -4.3e+133], N[Not[LessEqual[y, 2.6e-148]], $MachinePrecision]], N[(N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;y \leq -4.3 \cdot 10^{+133} \lor \neg \left(y \leq 2.6 \cdot 10^{-148}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\right) - t_1\\
\end{array}
\end{array}
if y < -4.29999999999999994e133 or 2.60000000000000008e-148 < y Initial program 82.6%
associate-*l*82.6%
associate--l+82.6%
distribute-rgt-out--84.8%
associate-*l*84.9%
associate-*l*84.9%
Simplified84.9%
associate-*r*84.8%
distribute-rgt-out--82.6%
associate-*l*87.5%
associate-*l*87.5%
*-commutative87.5%
Applied egg-rr87.5%
Taylor expanded in x around inf 67.3%
cancel-sign-sub-inv67.3%
associate-*r*70.0%
metadata-eval70.0%
*-commutative70.0%
Simplified70.0%
if -4.29999999999999994e133 < y < 2.60000000000000008e-148Initial program 90.9%
associate-*l*90.9%
associate--l+90.9%
distribute-rgt-out--91.7%
associate-*l*90.9%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in y around 0 85.7%
Final simplification77.4%
NOTE: y and z 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 (* 27.0 k))))
(if (or (<= t -2.6e-35) (not (<= t 4.6e+58)))
(- (* t (- (* a (- 4.0)) (* (* z (* x y)) -18.0))) t_1)
(- (- (* b c) (* 4.0 (* x i))) t_1))))assert(y < z);
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 * (27.0 * k);
double tmp;
if ((t <= -2.6e-35) || !(t <= 4.6e+58)) {
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
}
return tmp;
}
NOTE: y and z 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 * (27.0d0 * k)
if ((t <= (-2.6d-35)) .or. (.not. (t <= 4.6d+58))) then
tmp = (t * ((a * -4.0d0) - ((z * (x * y)) * (-18.0d0)))) - t_1
else
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
end if
code = tmp
end function
assert y < z;
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 * (27.0 * k);
double tmp;
if ((t <= -2.6e-35) || !(t <= 4.6e+58)) {
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_1;
} else {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (27.0 * k) tmp = 0 if (t <= -2.6e-35) or not (t <= 4.6e+58): tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_1 else: tmp = ((b * c) - (4.0 * (x * i))) - t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(27.0 * k)) tmp = 0.0 if ((t <= -2.6e-35) || !(t <= 4.6e+58)) tmp = Float64(Float64(t * Float64(Float64(a * Float64(-4.0)) - Float64(Float64(z * Float64(x * y)) * -18.0))) - t_1); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (27.0 * k);
tmp = 0.0;
if ((t <= -2.6e-35) || ~((t <= 4.6e+58)))
tmp = (t * ((a * -4.0) - ((z * (x * y)) * -18.0))) - t_1;
else
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -2.6e-35], N[Not[LessEqual[t, 4.6e+58]], $MachinePrecision]], N[(N[(t * N[(N[(a * (-4.0)), $MachinePrecision] - N[(N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(27 \cdot k\right)\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{-35} \lor \neg \left(t \leq 4.6 \cdot 10^{+58}\right):\\
\;\;\;\;t \cdot \left(a \cdot \left(-4\right) - \left(z \cdot \left(x \cdot y\right)\right) \cdot -18\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\
\end{array}
\end{array}
if t < -2.60000000000000005e-35 or 4.60000000000000005e58 < t Initial program 85.8%
associate-*l*85.8%
associate--l+85.8%
distribute-rgt-out--89.1%
associate-*l*89.2%
associate-*l*89.2%
Simplified89.2%
associate-*r*89.1%
distribute-rgt-out--85.8%
associate-*l*82.6%
associate-*l*82.5%
*-commutative82.5%
Applied egg-rr82.5%
Taylor expanded in t around -inf 78.6%
associate-*r*78.6%
neg-mul-178.6%
cancel-sign-sub-inv78.6%
*-commutative78.6%
associate-*r*79.4%
metadata-eval79.4%
Simplified79.4%
if -2.60000000000000005e-35 < t < 4.60000000000000005e58Initial program 87.1%
associate-*l*87.1%
associate--l+87.1%
distribute-rgt-out--87.1%
associate-*l*86.4%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in t around 0 82.9%
Final simplification81.3%
NOTE: y and z 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 (* y z)))
(t_2 (* k (* j -27.0)))
(t_3 (- (+ (* b c) (* -4.0 (* t a))) (* 4.0 (* x i)))))
(if (<= k -2.15e-27)
(+ t_2 (* 18.0 (* t t_1)))
(if (<= k 1.1e+97)
t_3
(if (<= k 1.85e+129)
(+ (* t_1 (* 18.0 t)) (* j (* k -27.0)))
(if (<= k 7e+177) t_3 (+ t_2 (* x (* i -4.0)))))))))assert(y < z);
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 * (y * z);
double t_2 = k * (j * -27.0);
double t_3 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
double tmp;
if (k <= -2.15e-27) {
tmp = t_2 + (18.0 * (t * t_1));
} else if (k <= 1.1e+97) {
tmp = t_3;
} else if (k <= 1.85e+129) {
tmp = (t_1 * (18.0 * t)) + (j * (k * -27.0));
} else if (k <= 7e+177) {
tmp = t_3;
} else {
tmp = t_2 + (x * (i * -4.0));
}
return tmp;
}
NOTE: y and z 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 = x * (y * z)
t_2 = k * (j * (-27.0d0))
t_3 = ((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))
if (k <= (-2.15d-27)) then
tmp = t_2 + (18.0d0 * (t * t_1))
else if (k <= 1.1d+97) then
tmp = t_3
else if (k <= 1.85d+129) then
tmp = (t_1 * (18.0d0 * t)) + (j * (k * (-27.0d0)))
else if (k <= 7d+177) then
tmp = t_3
else
tmp = t_2 + (x * (i * (-4.0d0)))
end if
code = tmp
end function
assert y < z;
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 * (y * z);
double t_2 = k * (j * -27.0);
double t_3 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
double tmp;
if (k <= -2.15e-27) {
tmp = t_2 + (18.0 * (t * t_1));
} else if (k <= 1.1e+97) {
tmp = t_3;
} else if (k <= 1.85e+129) {
tmp = (t_1 * (18.0 * t)) + (j * (k * -27.0));
} else if (k <= 7e+177) {
tmp = t_3;
} else {
tmp = t_2 + (x * (i * -4.0));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (y * z) t_2 = k * (j * -27.0) t_3 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i)) tmp = 0 if k <= -2.15e-27: tmp = t_2 + (18.0 * (t * t_1)) elif k <= 1.1e+97: tmp = t_3 elif k <= 1.85e+129: tmp = (t_1 * (18.0 * t)) + (j * (k * -27.0)) elif k <= 7e+177: tmp = t_3 else: tmp = t_2 + (x * (i * -4.0)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(y * z)) t_2 = Float64(k * Float64(j * -27.0)) t_3 = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (k <= -2.15e-27) tmp = Float64(t_2 + Float64(18.0 * Float64(t * t_1))); elseif (k <= 1.1e+97) tmp = t_3; elseif (k <= 1.85e+129) tmp = Float64(Float64(t_1 * Float64(18.0 * t)) + Float64(j * Float64(k * -27.0))); elseif (k <= 7e+177) tmp = t_3; else tmp = Float64(t_2 + Float64(x * Float64(i * -4.0))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (y * z);
t_2 = k * (j * -27.0);
t_3 = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
tmp = 0.0;
if (k <= -2.15e-27)
tmp = t_2 + (18.0 * (t * t_1));
elseif (k <= 1.1e+97)
tmp = t_3;
elseif (k <= 1.85e+129)
tmp = (t_1 * (18.0 * t)) + (j * (k * -27.0));
elseif (k <= 7e+177)
tmp = t_3;
else
tmp = t_2 + (x * (i * -4.0));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -2.15e-27], N[(t$95$2 + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.1e+97], t$95$3, If[LessEqual[k, 1.85e+129], N[(N[(t$95$1 * N[(18.0 * t), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7e+177], t$95$3, N[(t$95$2 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
t_3 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;k \leq -2.15 \cdot 10^{-27}:\\
\;\;\;\;t_2 + 18 \cdot \left(t \cdot t_1\right)\\
\mathbf{elif}\;k \leq 1.1 \cdot 10^{+97}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;k \leq 1.85 \cdot 10^{+129}:\\
\;\;\;\;t_1 \cdot \left(18 \cdot t\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 7 \cdot 10^{+177}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2 + x \cdot \left(i \cdot -4\right)\\
\end{array}
\end{array}
if k < -2.15000000000000001e-27Initial program 83.7%
Simplified88.2%
Taylor expanded in z around inf 62.0%
if -2.15000000000000001e-27 < k < 1.1e97 or 1.84999999999999989e129 < k < 6.99999999999999983e177Initial program 87.7%
associate-*l*87.7%
associate--l+87.7%
distribute-rgt-out--88.4%
associate-*l*87.8%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in y around 0 73.2%
Taylor expanded in j around 0 66.6%
if 1.1e97 < k < 1.84999999999999989e129Initial program 74.8%
Simplified74.8%
+-commutative74.8%
*-commutative74.8%
fma-def99.8%
associate-*r*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 84.3%
associate-*r*84.5%
associate-*r*84.5%
Simplified84.5%
fma-udef72.0%
associate-*r*72.0%
*-commutative72.0%
associate-*l*72.0%
Applied egg-rr72.0%
if 6.99999999999999983e177 < k Initial program 89.7%
Simplified93.4%
Taylor expanded in i around inf 83.4%
associate-*r*83.4%
*-commutative83.4%
Simplified83.4%
Final simplification67.5%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -2.05e-39) (not (<= t 3.05e+57))) (+ (* k (* j -27.0)) (* t (+ (* a -4.0) (* 18.0 (* x (* y z)))))) (- (- (* b c) (* 4.0 (* x i))) (* j (* 27.0 k)))))
assert(y < z);
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 <= -2.05e-39) || !(t <= 3.05e+57)) {
tmp = (k * (j * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
}
return tmp;
}
NOTE: y and z 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 <= (-2.05d-39)) .or. (.not. (t <= 3.05d+57))) then
tmp = (k * (j * (-27.0d0))) + (t * ((a * (-4.0d0)) + (18.0d0 * (x * (y * z)))))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - (j * (27.0d0 * k))
end if
code = tmp
end function
assert y < z;
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 <= -2.05e-39) || !(t <= 3.05e+57)) {
tmp = (k * (j * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -2.05e-39) or not (t <= 3.05e+57): tmp = (k * (j * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z))))) else: tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -2.05e-39) || !(t <= 3.05e+57)) tmp = Float64(Float64(k * Float64(j * -27.0)) + Float64(t * Float64(Float64(a * -4.0) + Float64(18.0 * Float64(x * Float64(y * z)))))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(j * Float64(27.0 * k))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -2.05e-39) || ~((t <= 3.05e+57)))
tmp = (k * (j * -27.0)) + (t * ((a * -4.0) + (18.0 * (x * (y * z)))));
else
tmp = ((b * c) - (4.0 * (x * i))) - (j * (27.0 * k));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -2.05e-39], N[Not[LessEqual[t, 3.05e+57]], $MachinePrecision]], N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a * -4.0), $MachinePrecision] + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{-39} \lor \neg \left(t \leq 3.05 \cdot 10^{+57}\right):\\
\;\;\;\;k \cdot \left(j \cdot -27\right) + t \cdot \left(a \cdot -4 + 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\
\end{array}
\end{array}
if t < -2.05e-39 or 3.04999999999999988e57 < t Initial program 85.8%
Simplified90.8%
Taylor expanded in t around inf 78.6%
if -2.05e-39 < t < 3.04999999999999988e57Initial program 87.1%
associate-*l*87.1%
associate--l+87.1%
distribute-rgt-out--87.1%
associate-*l*86.4%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in t around 0 82.9%
Final simplification80.9%
NOTE: y and z 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) (* k (* j -27.0)))))
(if (<= k -1.05e-125)
t_1
(if (<= k 7.5e-52)
(- (* b c) (* 4.0 (* t a)))
(if (<= k 2.6e+56) (* -4.0 (+ (* x i) (* t a))) t_1)))))assert(y < z);
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) + (k * (j * -27.0));
double tmp;
if (k <= -1.05e-125) {
tmp = t_1;
} else if (k <= 7.5e-52) {
tmp = (b * c) - (4.0 * (t * a));
} else if (k <= 2.6e+56) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z 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) + (k * (j * (-27.0d0)))
if (k <= (-1.05d-125)) then
tmp = t_1
else if (k <= 7.5d-52) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (k <= 2.6d+56) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
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) + (k * (j * -27.0));
double tmp;
if (k <= -1.05e-125) {
tmp = t_1;
} else if (k <= 7.5e-52) {
tmp = (b * c) - (4.0 * (t * a));
} else if (k <= 2.6e+56) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (k * (j * -27.0)) tmp = 0 if k <= -1.05e-125: tmp = t_1 elif k <= 7.5e-52: tmp = (b * c) - (4.0 * (t * a)) elif k <= 2.6e+56: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) tmp = 0.0 if (k <= -1.05e-125) tmp = t_1; elseif (k <= 7.5e-52) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (k <= 2.6e+56) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (k * (j * -27.0));
tmp = 0.0;
if (k <= -1.05e-125)
tmp = t_1;
elseif (k <= 7.5e-52)
tmp = (b * c) - (4.0 * (t * a));
elseif (k <= 2.6e+56)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.05e-125], t$95$1, If[LessEqual[k, 7.5e-52], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.6e+56], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;k \leq -1.05 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 7.5 \cdot 10^{-52}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;k \leq 2.6 \cdot 10^{+56}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if k < -1.05e-125 or 2.60000000000000011e56 < k Initial program 84.7%
Simplified87.6%
Taylor expanded in b around inf 59.1%
if -1.05e-125 < k < 7.50000000000000006e-52Initial program 87.9%
Taylor expanded in x around 0 52.2%
Taylor expanded in j around 0 48.5%
if 7.50000000000000006e-52 < k < 2.60000000000000011e56Initial program 93.8%
associate-*l*93.7%
associate--l+93.7%
distribute-rgt-out--93.7%
associate-*l*99.9%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around 0 68.9%
Taylor expanded in j around 0 62.8%
Taylor expanded in b around 0 44.4%
cancel-sign-sub-inv44.4%
*-commutative44.4%
metadata-eval44.4%
*-commutative44.4%
distribute-lft-out44.4%
*-commutative44.4%
Simplified44.4%
Final simplification54.2%
NOTE: y and z 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) (* k (* j -27.0)))))
(if (<= k -4.2e-120)
t_1
(if (<= k 1.8e-52)
(- (* b c) (* 4.0 (* t a)))
(if (<= k 5e+59) (- (* b c) (* 4.0 (* x i))) t_1)))))assert(y < z);
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) + (k * (j * -27.0));
double tmp;
if (k <= -4.2e-120) {
tmp = t_1;
} else if (k <= 1.8e-52) {
tmp = (b * c) - (4.0 * (t * a));
} else if (k <= 5e+59) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z 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) + (k * (j * (-27.0d0)))
if (k <= (-4.2d-120)) then
tmp = t_1
else if (k <= 1.8d-52) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (k <= 5d+59) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
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) + (k * (j * -27.0));
double tmp;
if (k <= -4.2e-120) {
tmp = t_1;
} else if (k <= 1.8e-52) {
tmp = (b * c) - (4.0 * (t * a));
} else if (k <= 5e+59) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (k * (j * -27.0)) tmp = 0 if k <= -4.2e-120: tmp = t_1 elif k <= 1.8e-52: tmp = (b * c) - (4.0 * (t * a)) elif k <= 5e+59: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) tmp = 0.0 if (k <= -4.2e-120) tmp = t_1; elseif (k <= 1.8e-52) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (k <= 5e+59) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (k * (j * -27.0));
tmp = 0.0;
if (k <= -4.2e-120)
tmp = t_1;
elseif (k <= 1.8e-52)
tmp = (b * c) - (4.0 * (t * a));
elseif (k <= 5e+59)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -4.2e-120], t$95$1, If[LessEqual[k, 1.8e-52], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5e+59], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;k \leq -4.2 \cdot 10^{-120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;k \leq 1.8 \cdot 10^{-52}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;k \leq 5 \cdot 10^{+59}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if k < -4.2000000000000001e-120 or 4.9999999999999997e59 < k Initial program 84.5%
Simplified88.1%
Taylor expanded in b around inf 58.6%
if -4.2000000000000001e-120 < k < 1.79999999999999994e-52Initial program 87.9%
Taylor expanded in x around 0 52.2%
Taylor expanded in j around 0 48.5%
if 1.79999999999999994e-52 < k < 4.9999999999999997e59Initial program 94.4%
associate-*l*94.4%
associate--l+94.4%
distribute-rgt-out--94.4%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in y around 0 72.4%
Taylor expanded in j around 0 56.2%
Taylor expanded in a around 0 40.4%
Final simplification53.5%
NOTE: y and z 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 (* k (* j -27.0))))
(if (<= k -1.02e+24)
(+ t_1 (* -4.0 (* t a)))
(if (<= k 4.9e-53)
(- (* b c) (* 4.0 (* t a)))
(if (<= k 8.6e+58) (- (* b c) (* 4.0 (* x i))) (+ (* b c) t_1))))))assert(y < z);
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 = k * (j * -27.0);
double tmp;
if (k <= -1.02e+24) {
tmp = t_1 + (-4.0 * (t * a));
} else if (k <= 4.9e-53) {
tmp = (b * c) - (4.0 * (t * a));
} else if (k <= 8.6e+58) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
NOTE: y and z 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 = k * (j * (-27.0d0))
if (k <= (-1.02d+24)) then
tmp = t_1 + ((-4.0d0) * (t * a))
else if (k <= 4.9d-53) then
tmp = (b * c) - (4.0d0 * (t * a))
else if (k <= 8.6d+58) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
assert y < z;
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 = k * (j * -27.0);
double tmp;
if (k <= -1.02e+24) {
tmp = t_1 + (-4.0 * (t * a));
} else if (k <= 4.9e-53) {
tmp = (b * c) - (4.0 * (t * a));
} else if (k <= 8.6e+58) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) tmp = 0 if k <= -1.02e+24: tmp = t_1 + (-4.0 * (t * a)) elif k <= 4.9e-53: tmp = (b * c) - (4.0 * (t * a)) elif k <= 8.6e+58: tmp = (b * c) - (4.0 * (x * i)) else: tmp = (b * c) + t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (k <= -1.02e+24) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); elseif (k <= 4.9e-53) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))); elseif (k <= 8.6e+58) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = k * (j * -27.0);
tmp = 0.0;
if (k <= -1.02e+24)
tmp = t_1 + (-4.0 * (t * a));
elseif (k <= 4.9e-53)
tmp = (b * c) - (4.0 * (t * a));
elseif (k <= 8.6e+58)
tmp = (b * c) - (4.0 * (x * i));
else
tmp = (b * c) + t_1;
end
tmp_2 = tmp;
end
NOTE: y and z 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[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.02e+24], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.9e-53], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.6e+58], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;k \leq -1.02 \cdot 10^{+24}:\\
\;\;\;\;t_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;k \leq 4.9 \cdot 10^{-53}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;k \leq 8.6 \cdot 10^{+58}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t_1\\
\end{array}
\end{array}
if k < -1.02000000000000004e24Initial program 84.6%
Simplified89.8%
Taylor expanded in a around inf 43.8%
*-commutative43.8%
Simplified43.8%
if -1.02000000000000004e24 < k < 4.89999999999999963e-53Initial program 88.4%
Taylor expanded in x around 0 57.0%
Taylor expanded in j around 0 51.5%
if 4.89999999999999963e-53 < k < 8.59999999999999982e58Initial program 94.4%
associate-*l*94.4%
associate--l+94.4%
distribute-rgt-out--94.4%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in y around 0 72.4%
Taylor expanded in j around 0 56.2%
Taylor expanded in a around 0 40.4%
if 8.59999999999999982e58 < k Initial program 81.5%
Simplified83.6%
Taylor expanded in b around inf 62.1%
Final simplification51.2%
NOTE: y and z 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.8e-39) (* k (* j -27.0)) (if (<= k 5.7e+175) (* -4.0 (+ (* x i) (* t a))) (* j (* k -27.0)))))
assert(y < z);
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.8e-39) {
tmp = k * (j * -27.0);
} else if (k <= 5.7e+175) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: y and z 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.8d-39)) then
tmp = k * (j * (-27.0d0))
else if (k <= 5.7d+175) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
assert y < z;
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.8e-39) {
tmp = k * (j * -27.0);
} else if (k <= 5.7e+175) {
tmp = -4.0 * ((x * i) + (t * a));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -3.8e-39: tmp = k * (j * -27.0) elif k <= 5.7e+175: tmp = -4.0 * ((x * i) + (t * a)) else: tmp = j * (k * -27.0) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -3.8e-39) tmp = Float64(k * Float64(j * -27.0)); elseif (k <= 5.7e+175) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -3.8e-39)
tmp = k * (j * -27.0);
elseif (k <= 5.7e+175)
tmp = -4.0 * ((x * i) + (t * a));
else
tmp = j * (k * -27.0);
end
tmp_2 = tmp;
end
NOTE: y and z 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.8e-39], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.7e+175], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.8 \cdot 10^{-39}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 5.7 \cdot 10^{+175}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -3.8000000000000002e-39Initial program 84.4%
Simplified88.7%
Taylor expanded in k around inf 33.5%
*-commutative33.5%
*-commutative33.5%
associate-*r*33.5%
*-commutative33.5%
Simplified33.5%
if -3.8000000000000002e-39 < k < 5.70000000000000024e175Initial program 87.4%
associate-*l*87.4%
associate--l+87.4%
distribute-rgt-out--88.0%
associate-*l*87.4%
associate-*l*87.4%
Simplified87.4%
Taylor expanded in y around 0 72.0%
Taylor expanded in j around 0 64.1%
Taylor expanded in b around 0 41.6%
cancel-sign-sub-inv41.6%
*-commutative41.6%
metadata-eval41.6%
*-commutative41.6%
distribute-lft-out41.6%
*-commutative41.6%
Simplified41.6%
if 5.70000000000000024e175 < k Initial program 86.7%
Simplified93.6%
+-commutative93.6%
*-commutative93.6%
fma-def93.6%
associate-*r*93.6%
associate-*r*93.6%
Applied egg-rr93.6%
Taylor expanded in j around inf 64.9%
associate-*r*65.0%
*-commutative65.0%
associate-*l*68.1%
Simplified68.1%
Final simplification42.5%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* -27.0 (* j k)))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return -27.0 * (j * k);
}
NOTE: y and z 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 = (-27.0d0) * (j * k)
end function
assert y < z;
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 -27.0 * (j * k);
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): return -27.0 * (j * k)
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(-27.0 * Float64(j * k)) end
y, z = num2cell(sort([y, z])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = -27.0 * (j * k);
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
-27 \cdot \left(j \cdot k\right)
\end{array}
Initial program 86.5%
Simplified88.9%
Taylor expanded in k around inf 23.6%
Final simplification23.6%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* j (* k -27.0)))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return j * (k * -27.0);
}
NOTE: y and z 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 = j * (k * (-27.0d0))
end function
assert y < z;
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 j * (k * -27.0);
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): return j * (k * -27.0)
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(j * Float64(k * -27.0)) end
y, z = num2cell(sort([y, z])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = j * (k * -27.0);
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
j \cdot \left(k \cdot -27\right)
\end{array}
Initial program 86.5%
Simplified88.9%
+-commutative88.9%
*-commutative88.9%
fma-def90.5%
associate-*r*90.5%
associate-*r*90.5%
Applied egg-rr90.5%
Taylor expanded in j around inf 23.6%
associate-*r*23.6%
*-commutative23.6%
associate-*l*24.0%
Simplified24.0%
Final simplification24.0%
(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 2023308
(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)))