
(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 24 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: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY)
t_1
(fma j (* k -27.0) (* x (- (fma i 4.0 (* y (* (* z t) -18.0)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(j, (k * -27.0), (x * -fma(i, 4.0, (y * ((z * t) * -18.0)))));
}
return tmp;
}
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(j, Float64(k * -27.0), Float64(x * Float64(-fma(i, 4.0, Float64(y * Float64(Float64(z * t) * -18.0)))))); end return tmp end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(j * N[(k * -27.0), $MachinePrecision] + N[(x * (-N[(i * 4.0 + N[(y * N[(N[(z * t), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j, k \cdot -27, x \cdot \left(-\mathsf{fma}\left(i, 4, y \cdot \left(\left(z \cdot t\right) \cdot -18\right)\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.7%
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%
sub-neg0.0%
+-commutative0.0%
associate-*l*0.0%
distribute-rgt-neg-in0.0%
fma-def21.4%
*-commutative21.4%
distribute-rgt-neg-in21.4%
metadata-eval21.4%
sub-neg21.4%
+-commutative21.4%
associate-*l*21.4%
distribute-rgt-neg-in21.4%
Simplified50.0%
Taylor expanded in x around -inf 75.5%
+-commutative75.5%
metadata-eval75.5%
cancel-sign-sub-inv75.5%
mul-1-neg75.5%
cancel-sign-sub-inv75.5%
metadata-eval75.5%
+-commutative75.5%
distribute-rgt-neg-in75.5%
*-commutative75.5%
fma-def75.5%
*-commutative75.5%
associate-*l*75.5%
*-commutative75.5%
Simplified75.5%
Final simplification93.5%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.7%
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%
sub-neg0.0%
associate-+l-0.0%
sub-neg0.0%
sub-neg0.0%
distribute-rgt-out--10.7%
associate-*l*14.3%
distribute-lft-neg-in14.3%
cancel-sign-sub14.3%
associate-*l*14.3%
associate-*l*14.3%
Simplified14.3%
Taylor expanded in x around inf 71.8%
Final simplification93.1%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* y (* x z))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -2e+108)
(- (* t (- (* a -4.0) (* -18.0 t_1))) t_2)
(if (<= t_2 1e+131)
(- (- (* b c) (* t (- (* a 4.0) (* 18.0 t_1)))) (* 4.0 (* x i)))
(+ (* -4.0 (* x i)) (* -27.0 (* j k)))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = y * (x * z);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+108) {
tmp = (t * ((a * -4.0) - (-18.0 * t_1))) - t_2;
} else if (t_2 <= 1e+131) {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * t_1)))) - (4.0 * (x * i));
} else {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (x * z)
t_2 = (j * 27.0d0) * k
if (t_2 <= (-2d+108)) then
tmp = (t * ((a * (-4.0d0)) - ((-18.0d0) * t_1))) - t_2
else if (t_2 <= 1d+131) then
tmp = ((b * c) - (t * ((a * 4.0d0) - (18.0d0 * t_1)))) - (4.0d0 * (x * i))
else
tmp = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = y * (x * z);
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -2e+108) {
tmp = (t * ((a * -4.0) - (-18.0 * t_1))) - t_2;
} else if (t_2 <= 1e+131) {
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * t_1)))) - (4.0 * (x * i));
} else {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = y * (x * z) t_2 = (j * 27.0) * k tmp = 0 if t_2 <= -2e+108: tmp = (t * ((a * -4.0) - (-18.0 * t_1))) - t_2 elif t_2 <= 1e+131: tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * t_1)))) - (4.0 * (x * i)) else: tmp = (-4.0 * (x * i)) + (-27.0 * (j * k)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(y * Float64(x * z)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -2e+108) tmp = Float64(Float64(t * Float64(Float64(a * -4.0) - Float64(-18.0 * t_1))) - t_2); elseif (t_2 <= 1e+131) tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * t_1)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = y * (x * z);
t_2 = (j * 27.0) * k;
tmp = 0.0;
if (t_2 <= -2e+108)
tmp = (t * ((a * -4.0) - (-18.0 * t_1))) - t_2;
elseif (t_2 <= 1e+131)
tmp = ((b * c) - (t * ((a * 4.0) - (18.0 * t_1)))) - (4.0 * (x * i));
else
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+108], N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] - N[(-18.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t$95$2, 1e+131], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot z\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+108}:\\
\;\;\;\;t \cdot \left(a \cdot -4 - -18 \cdot t_1\right) - t_2\\
\mathbf{elif}\;t_2 \leq 10^{+131}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot t_1\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -2.0000000000000001e108Initial program 77.3%
Taylor expanded in t around -inf 77.5%
if -2.0000000000000001e108 < (*.f64 (*.f64 j 27) k) < 9.9999999999999991e130Initial program 88.6%
sub-neg88.6%
associate-+l-88.6%
sub-neg88.6%
sub-neg88.6%
distribute-rgt-out--89.7%
associate-*l*87.0%
distribute-lft-neg-in87.0%
cancel-sign-sub87.0%
associate-*l*87.0%
associate-*l*86.5%
Simplified86.5%
Taylor expanded in j around 0 83.2%
if 9.9999999999999991e130 < (*.f64 (*.f64 j 27) k) Initial program 79.3%
sub-neg79.3%
+-commutative79.3%
associate-*l*82.2%
distribute-rgt-neg-in82.2%
fma-def88.1%
*-commutative88.1%
distribute-rgt-neg-in88.1%
metadata-eval88.1%
sub-neg88.1%
+-commutative88.1%
associate-*l*88.1%
distribute-rgt-neg-in88.1%
Simplified93.9%
Taylor expanded in t around 0 83.0%
fma-def86.0%
associate-*r*86.0%
*-commutative86.0%
fma-def88.9%
associate-*r*88.9%
*-commutative88.9%
*-commutative88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in c around 0 80.3%
Final simplification81.7%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.2e+182)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(-
(- (* b c) (* t (- (* a 4.0) (* (* x 18.0) (* y z)))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.2e+182) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.2d+182)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else
tmp = ((b * c) - (t * ((a * 4.0d0) - ((x * 18.0d0) * (y * z))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.2e+182) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.2e+182: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) else: tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.2e+182) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(Float64(x * 18.0) * Float64(y * z))))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (x <= -1.2e+182)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
else
tmp = ((b * c) - (t * ((a * 4.0) - ((x * 18.0) * (y * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.2e+182], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+182}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - t \cdot \left(a \cdot 4 - \left(x \cdot 18\right) \cdot \left(y \cdot z\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if x < -1.20000000000000005e182Initial program 59.6%
sub-neg59.6%
associate-+l-59.6%
sub-neg59.6%
sub-neg59.6%
distribute-rgt-out--59.6%
associate-*l*59.6%
distribute-lft-neg-in59.6%
cancel-sign-sub59.6%
associate-*l*59.6%
associate-*l*59.6%
Simplified59.6%
Taylor expanded in x around inf 90.7%
if -1.20000000000000005e182 < x Initial program 88.2%
sub-neg88.2%
associate-+l-88.2%
sub-neg88.2%
sub-neg88.2%
distribute-rgt-out--89.5%
associate-*l*87.9%
distribute-lft-neg-in87.9%
cancel-sign-sub87.9%
associate-*l*87.9%
associate-*l*87.9%
Simplified87.9%
Final simplification88.2%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (- (* t (- (* a -4.0) (* -18.0 (* y (* x z))))) t_1)))
(if (<= t -1.25e+84)
t_2
(if (<= t -4.8e-85)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= t -1.2e-115)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= t 1.3e+23)
(- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
t_2))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (t * ((a * -4.0) - (-18.0 * (y * (x * z))))) - t_1;
double tmp;
if (t <= -1.25e+84) {
tmp = t_2;
} else if (t <= -4.8e-85) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= -1.2e-115) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 1.3e+23) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t_2;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = (t * ((a * (-4.0d0)) - ((-18.0d0) * (y * (x * z))))) - t_1
if (t <= (-1.25d+84)) then
tmp = t_2
else if (t <= (-4.8d-85)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (t <= (-1.2d-115)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (t <= 1.3d+23) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = t_2
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = (t * ((a * -4.0) - (-18.0 * (y * (x * z))))) - t_1;
double tmp;
if (t <= -1.25e+84) {
tmp = t_2;
} else if (t <= -4.8e-85) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= -1.2e-115) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 1.3e+23) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t_2;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (t * ((a * -4.0) - (-18.0 * (y * (x * z))))) - t_1 tmp = 0 if t <= -1.25e+84: tmp = t_2 elif t <= -4.8e-85: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif t <= -1.2e-115: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif t <= 1.3e+23: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = t_2 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(t * Float64(Float64(a * -4.0) - Float64(-18.0 * Float64(y * Float64(x * z))))) - t_1) tmp = 0.0 if (t <= -1.25e+84) tmp = t_2; elseif (t <= -4.8e-85) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t <= -1.2e-115) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (t <= 1.3e+23) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = t_2; end return tmp end
j, k = num2cell(sort([j, k])){:}
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) - (-18.0 * (y * (x * z))))) - t_1;
tmp = 0.0;
if (t <= -1.25e+84)
tmp = t_2;
elseif (t <= -4.8e-85)
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
elseif (t <= -1.2e-115)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (t <= 1.3e+23)
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * N[(N[(a * -4.0), $MachinePrecision] - N[(-18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[t, -1.25e+84], t$95$2, If[LessEqual[t, -4.8e-85], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, -1.2e-115], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+23], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := t \cdot \left(a \cdot -4 - -18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right) - t_1\\
\mathbf{if}\;t \leq -1.25 \cdot 10^{+84}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-85}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-115}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+23}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.25e84 or 1.29999999999999996e23 < t Initial program 80.5%
Taylor expanded in t around -inf 80.7%
if -1.25e84 < t < -4.8000000000000001e-85Initial program 97.3%
Taylor expanded in x around 0 80.6%
if -4.8000000000000001e-85 < t < -1.20000000000000011e-115Initial program 89.5%
sub-neg89.5%
associate-+l-89.5%
sub-neg89.5%
sub-neg89.5%
distribute-rgt-out--89.5%
associate-*l*89.5%
distribute-lft-neg-in89.5%
cancel-sign-sub89.5%
associate-*l*89.5%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in x around inf 72.5%
if -1.20000000000000011e-115 < t < 1.29999999999999996e23Initial program 86.1%
sub-neg86.1%
associate-+l-86.1%
sub-neg86.1%
sub-neg86.1%
distribute-rgt-out--86.1%
associate-*l*86.1%
distribute-lft-neg-in86.1%
cancel-sign-sub86.1%
associate-*l*86.1%
associate-*l*86.0%
Simplified86.0%
Taylor expanded in t around 0 78.9%
Final simplification79.8%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0)))
(t_2 (* -27.0 (* j k)))
(t_3 (* 18.0 (* y (* t (* x z))))))
(if (<= x -8e+214)
t_3
(if (<= x -1.18e+176)
(* x (* i -4.0))
(if (<= x -1.7e-60)
t_3
(if (<= x -4e-170)
t_1
(if (<= x -5.2e-289)
t_2
(if (<= x 8.2e-280)
(* b c)
(if (<= x 3.6e-235)
t_2
(if (<= x 9.5e-69) t_1 (* (* (* (* x 18.0) y) z) t)))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double t_2 = -27.0 * (j * k);
double t_3 = 18.0 * (y * (t * (x * z)));
double tmp;
if (x <= -8e+214) {
tmp = t_3;
} else if (x <= -1.18e+176) {
tmp = x * (i * -4.0);
} else if (x <= -1.7e-60) {
tmp = t_3;
} else if (x <= -4e-170) {
tmp = t_1;
} else if (x <= -5.2e-289) {
tmp = t_2;
} else if (x <= 8.2e-280) {
tmp = b * c;
} else if (x <= 3.6e-235) {
tmp = t_2;
} else if (x <= 9.5e-69) {
tmp = t_1;
} else {
tmp = (((x * 18.0) * y) * z) * t;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
t_2 = (-27.0d0) * (j * k)
t_3 = 18.0d0 * (y * (t * (x * z)))
if (x <= (-8d+214)) then
tmp = t_3
else if (x <= (-1.18d+176)) then
tmp = x * (i * (-4.0d0))
else if (x <= (-1.7d-60)) then
tmp = t_3
else if (x <= (-4d-170)) then
tmp = t_1
else if (x <= (-5.2d-289)) then
tmp = t_2
else if (x <= 8.2d-280) then
tmp = b * c
else if (x <= 3.6d-235) then
tmp = t_2
else if (x <= 9.5d-69) then
tmp = t_1
else
tmp = (((x * 18.0d0) * y) * z) * t
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double t_2 = -27.0 * (j * k);
double t_3 = 18.0 * (y * (t * (x * z)));
double tmp;
if (x <= -8e+214) {
tmp = t_3;
} else if (x <= -1.18e+176) {
tmp = x * (i * -4.0);
} else if (x <= -1.7e-60) {
tmp = t_3;
} else if (x <= -4e-170) {
tmp = t_1;
} else if (x <= -5.2e-289) {
tmp = t_2;
} else if (x <= 8.2e-280) {
tmp = b * c;
} else if (x <= 3.6e-235) {
tmp = t_2;
} else if (x <= 9.5e-69) {
tmp = t_1;
} else {
tmp = (((x * 18.0) * y) * z) * t;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) t_2 = -27.0 * (j * k) t_3 = 18.0 * (y * (t * (x * z))) tmp = 0 if x <= -8e+214: tmp = t_3 elif x <= -1.18e+176: tmp = x * (i * -4.0) elif x <= -1.7e-60: tmp = t_3 elif x <= -4e-170: tmp = t_1 elif x <= -5.2e-289: tmp = t_2 elif x <= 8.2e-280: tmp = b * c elif x <= 3.6e-235: tmp = t_2 elif x <= 9.5e-69: tmp = t_1 else: tmp = (((x * 18.0) * y) * z) * t return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) t_2 = Float64(-27.0 * Float64(j * k)) t_3 = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) tmp = 0.0 if (x <= -8e+214) tmp = t_3; elseif (x <= -1.18e+176) tmp = Float64(x * Float64(i * -4.0)); elseif (x <= -1.7e-60) tmp = t_3; elseif (x <= -4e-170) tmp = t_1; elseif (x <= -5.2e-289) tmp = t_2; elseif (x <= 8.2e-280) tmp = Float64(b * c); elseif (x <= 3.6e-235) tmp = t_2; elseif (x <= 9.5e-69) tmp = t_1; else tmp = Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * -4.0);
t_2 = -27.0 * (j * k);
t_3 = 18.0 * (y * (t * (x * z)));
tmp = 0.0;
if (x <= -8e+214)
tmp = t_3;
elseif (x <= -1.18e+176)
tmp = x * (i * -4.0);
elseif (x <= -1.7e-60)
tmp = t_3;
elseif (x <= -4e-170)
tmp = t_1;
elseif (x <= -5.2e-289)
tmp = t_2;
elseif (x <= 8.2e-280)
tmp = b * c;
elseif (x <= 3.6e-235)
tmp = t_2;
elseif (x <= 9.5e-69)
tmp = t_1;
else
tmp = (((x * 18.0) * y) * z) * t;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8e+214], t$95$3, If[LessEqual[x, -1.18e+176], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-60], t$95$3, If[LessEqual[x, -4e-170], t$95$1, If[LessEqual[x, -5.2e-289], t$95$2, If[LessEqual[x, 8.2e-280], N[(b * c), $MachinePrecision], If[LessEqual[x, 3.6e-235], t$95$2, If[LessEqual[x, 9.5e-69], t$95$1, N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
t_3 := 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -8 \cdot 10^{+214}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.18 \cdot 10^{+176}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-60}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-170}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-289}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-280}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-235}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-69}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\end{array}
\end{array}
if x < -7.9999999999999996e214 or -1.18000000000000006e176 < x < -1.70000000000000003e-60Initial program 77.2%
sub-neg77.2%
associate-+l-77.2%
sub-neg77.2%
sub-neg77.2%
distribute-rgt-out--77.2%
associate-*l*78.6%
distribute-lft-neg-in78.6%
cancel-sign-sub78.6%
associate-*l*78.6%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in t around inf 49.5%
Taylor expanded in y around inf 50.7%
if -7.9999999999999996e214 < x < -1.18000000000000006e176Initial program 70.0%
sub-neg70.0%
associate-+l-70.0%
sub-neg70.0%
sub-neg70.0%
distribute-rgt-out--70.0%
associate-*l*70.0%
distribute-lft-neg-in70.0%
cancel-sign-sub70.0%
associate-*l*70.0%
associate-*l*70.0%
Simplified70.0%
Taylor expanded in x around inf 90.0%
Taylor expanded in y around 0 70.4%
if -1.70000000000000003e-60 < x < -3.99999999999999993e-170 or 3.59999999999999999e-235 < x < 9.50000000000000094e-69Initial program 92.9%
sub-neg92.9%
associate-+l-92.9%
sub-neg92.9%
sub-neg92.9%
distribute-rgt-out--94.7%
associate-*l*91.3%
distribute-lft-neg-in91.3%
cancel-sign-sub91.3%
associate-*l*91.3%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in t around inf 57.4%
Taylor expanded in y around 0 49.0%
if -3.99999999999999993e-170 < x < -5.1999999999999998e-289 or 8.2000000000000003e-280 < x < 3.59999999999999999e-235Initial program 94.6%
sub-neg94.6%
+-commutative94.6%
associate-*l*94.5%
distribute-rgt-neg-in94.5%
fma-def97.2%
*-commutative97.2%
distribute-rgt-neg-in97.2%
metadata-eval97.2%
sub-neg97.2%
+-commutative97.2%
associate-*l*97.2%
distribute-rgt-neg-in97.2%
Simplified87.0%
Taylor expanded in j around inf 46.1%
if -5.1999999999999998e-289 < x < 8.2000000000000003e-280Initial program 92.3%
sub-neg92.3%
associate-+l-92.3%
sub-neg92.3%
sub-neg92.3%
distribute-rgt-out--92.3%
associate-*l*85.2%
distribute-lft-neg-in85.2%
cancel-sign-sub85.2%
associate-*l*85.2%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in j around 0 85.0%
Taylor expanded in c around inf 62.4%
if 9.50000000000000094e-69 < x Initial program 82.6%
sub-neg82.6%
associate-+l-82.6%
sub-neg82.6%
sub-neg82.6%
distribute-rgt-out--85.5%
associate-*l*86.9%
distribute-lft-neg-in86.9%
cancel-sign-sub86.9%
associate-*l*86.9%
associate-*l*85.4%
Simplified85.4%
Taylor expanded in t around inf 52.3%
pow152.3%
*-commutative52.3%
Applied egg-rr52.3%
unpow152.3%
*-commutative52.3%
associate-*l*55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in x around inf 44.0%
*-commutative44.0%
*-commutative44.0%
associate-*l*42.6%
*-commutative42.6%
associate-*r*43.9%
*-commutative43.9%
associate-*r*43.9%
*-commutative43.9%
associate-*r*43.9%
*-commutative43.9%
associate-*l*42.5%
Simplified42.5%
Final simplification48.8%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* 18.0 (* y (* z t)))))
(t_2 (* t (* a -4.0)))
(t_3 (* -27.0 (* j k))))
(if (<= x -8e+214)
(* 18.0 (* y (* t (* x z))))
(if (<= x -7.8e+170)
(* x (* i -4.0))
(if (<= x -2.8e-61)
t_1
(if (<= x -3.5e-169)
t_2
(if (<= x -1.62e-288)
t_3
(if (<= x 2.1e-277)
(* b c)
(if (<= x 3.1e-236) t_3 (if (<= x 6.2e-68) t_2 t_1))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (18.0 * (y * (z * t)));
double t_2 = t * (a * -4.0);
double t_3 = -27.0 * (j * k);
double tmp;
if (x <= -8e+214) {
tmp = 18.0 * (y * (t * (x * z)));
} else if (x <= -7.8e+170) {
tmp = x * (i * -4.0);
} else if (x <= -2.8e-61) {
tmp = t_1;
} else if (x <= -3.5e-169) {
tmp = t_2;
} else if (x <= -1.62e-288) {
tmp = t_3;
} else if (x <= 2.1e-277) {
tmp = b * c;
} else if (x <= 3.1e-236) {
tmp = t_3;
} else if (x <= 6.2e-68) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x * (18.0d0 * (y * (z * t)))
t_2 = t * (a * (-4.0d0))
t_3 = (-27.0d0) * (j * k)
if (x <= (-8d+214)) then
tmp = 18.0d0 * (y * (t * (x * z)))
else if (x <= (-7.8d+170)) then
tmp = x * (i * (-4.0d0))
else if (x <= (-2.8d-61)) then
tmp = t_1
else if (x <= (-3.5d-169)) then
tmp = t_2
else if (x <= (-1.62d-288)) then
tmp = t_3
else if (x <= 2.1d-277) then
tmp = b * c
else if (x <= 3.1d-236) then
tmp = t_3
else if (x <= 6.2d-68) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (18.0 * (y * (z * t)));
double t_2 = t * (a * -4.0);
double t_3 = -27.0 * (j * k);
double tmp;
if (x <= -8e+214) {
tmp = 18.0 * (y * (t * (x * z)));
} else if (x <= -7.8e+170) {
tmp = x * (i * -4.0);
} else if (x <= -2.8e-61) {
tmp = t_1;
} else if (x <= -3.5e-169) {
tmp = t_2;
} else if (x <= -1.62e-288) {
tmp = t_3;
} else if (x <= 2.1e-277) {
tmp = b * c;
} else if (x <= 3.1e-236) {
tmp = t_3;
} else if (x <= 6.2e-68) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (18.0 * (y * (z * t))) t_2 = t * (a * -4.0) t_3 = -27.0 * (j * k) tmp = 0 if x <= -8e+214: tmp = 18.0 * (y * (t * (x * z))) elif x <= -7.8e+170: tmp = x * (i * -4.0) elif x <= -2.8e-61: tmp = t_1 elif x <= -3.5e-169: tmp = t_2 elif x <= -1.62e-288: tmp = t_3 elif x <= 2.1e-277: tmp = b * c elif x <= 3.1e-236: tmp = t_3 elif x <= 6.2e-68: tmp = t_2 else: tmp = t_1 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))) t_2 = Float64(t * Float64(a * -4.0)) t_3 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (x <= -8e+214) tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))); elseif (x <= -7.8e+170) tmp = Float64(x * Float64(i * -4.0)); elseif (x <= -2.8e-61) tmp = t_1; elseif (x <= -3.5e-169) tmp = t_2; elseif (x <= -1.62e-288) tmp = t_3; elseif (x <= 2.1e-277) tmp = Float64(b * c); elseif (x <= 3.1e-236) tmp = t_3; elseif (x <= 6.2e-68) tmp = t_2; else tmp = t_1; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (18.0 * (y * (z * t)));
t_2 = t * (a * -4.0);
t_3 = -27.0 * (j * k);
tmp = 0.0;
if (x <= -8e+214)
tmp = 18.0 * (y * (t * (x * z)));
elseif (x <= -7.8e+170)
tmp = x * (i * -4.0);
elseif (x <= -2.8e-61)
tmp = t_1;
elseif (x <= -3.5e-169)
tmp = t_2;
elseif (x <= -1.62e-288)
tmp = t_3;
elseif (x <= 2.1e-277)
tmp = b * c;
elseif (x <= 3.1e-236)
tmp = t_3;
elseif (x <= 6.2e-68)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8e+214], N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.8e+170], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -2.8e-61], t$95$1, If[LessEqual[x, -3.5e-169], t$95$2, If[LessEqual[x, -1.62e-288], t$95$3, If[LessEqual[x, 2.1e-277], N[(b * c), $MachinePrecision], If[LessEqual[x, 3.1e-236], t$95$3, If[LessEqual[x, 6.2e-68], t$95$2, t$95$1]]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
t_2 := t \cdot \left(a \cdot -4\right)\\
t_3 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -8 \cdot 10^{+214}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{+170}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-169}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.62 \cdot 10^{-288}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-277}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{-236}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-68}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -7.9999999999999996e214Initial program 58.4%
sub-neg58.4%
associate-+l-58.4%
sub-neg58.4%
sub-neg58.4%
distribute-rgt-out--58.4%
associate-*l*58.4%
distribute-lft-neg-in58.4%
cancel-sign-sub58.4%
associate-*l*58.4%
associate-*l*58.4%
Simplified58.4%
Taylor expanded in t around inf 64.5%
Taylor expanded in y around inf 64.4%
if -7.9999999999999996e214 < x < -7.8000000000000005e170Initial program 70.0%
sub-neg70.0%
associate-+l-70.0%
sub-neg70.0%
sub-neg70.0%
distribute-rgt-out--70.0%
associate-*l*70.0%
distribute-lft-neg-in70.0%
cancel-sign-sub70.0%
associate-*l*70.0%
associate-*l*70.0%
Simplified70.0%
Taylor expanded in x around inf 90.0%
Taylor expanded in y around 0 70.4%
if -7.8000000000000005e170 < x < -2.8000000000000001e-61 or 6.1999999999999999e-68 < x Initial program 83.3%
sub-neg83.3%
associate-+l-83.3%
sub-neg83.3%
sub-neg83.3%
distribute-rgt-out--85.0%
associate-*l*86.6%
distribute-lft-neg-in86.6%
cancel-sign-sub86.6%
associate-*l*86.6%
associate-*l*85.8%
Simplified85.8%
Taylor expanded in x around inf 63.2%
Taylor expanded in y around inf 46.9%
if -2.8000000000000001e-61 < x < -3.5000000000000003e-169 or 3.0999999999999998e-236 < x < 6.1999999999999999e-68Initial program 92.9%
sub-neg92.9%
associate-+l-92.9%
sub-neg92.9%
sub-neg92.9%
distribute-rgt-out--94.7%
associate-*l*91.3%
distribute-lft-neg-in91.3%
cancel-sign-sub91.3%
associate-*l*91.3%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in t around inf 57.4%
Taylor expanded in y around 0 49.0%
if -3.5000000000000003e-169 < x < -1.6200000000000001e-288 or 2.09999999999999995e-277 < x < 3.0999999999999998e-236Initial program 94.6%
sub-neg94.6%
+-commutative94.6%
associate-*l*94.5%
distribute-rgt-neg-in94.5%
fma-def97.2%
*-commutative97.2%
distribute-rgt-neg-in97.2%
metadata-eval97.2%
sub-neg97.2%
+-commutative97.2%
associate-*l*97.2%
distribute-rgt-neg-in97.2%
Simplified87.0%
Taylor expanded in j around inf 46.1%
if -1.6200000000000001e-288 < x < 2.09999999999999995e-277Initial program 92.3%
sub-neg92.3%
associate-+l-92.3%
sub-neg92.3%
sub-neg92.3%
distribute-rgt-out--92.3%
associate-*l*85.2%
distribute-lft-neg-in85.2%
cancel-sign-sub85.2%
associate-*l*85.2%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in j around 0 85.0%
Taylor expanded in c around inf 62.4%
Final simplification50.3%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* k (* j -27.0))))
(t_2 (+ (* -4.0 (* x i)) (* -27.0 (* j k))))
(t_3 (+ (* b c) (* -4.0 (* t a)))))
(if (<= a -1.6e+39)
t_3
(if (<= a 6.5e-253)
t_2
(if (<= a 8.4e-153)
t_1
(if (<= a 2e-104)
(* (* (* (* x 18.0) y) z) t)
(if (<= a 1.8e-24)
t_1
(if (<= a 3.9e+108)
(* x (* t (* y (* 18.0 z))))
(if (<= a 8.4e+179) t_2 t_3)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (k * (j * -27.0));
double t_2 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double t_3 = (b * c) + (-4.0 * (t * a));
double tmp;
if (a <= -1.6e+39) {
tmp = t_3;
} else if (a <= 6.5e-253) {
tmp = t_2;
} else if (a <= 8.4e-153) {
tmp = t_1;
} else if (a <= 2e-104) {
tmp = (((x * 18.0) * y) * z) * t;
} else if (a <= 1.8e-24) {
tmp = t_1;
} else if (a <= 3.9e+108) {
tmp = x * (t * (y * (18.0 * z)));
} else if (a <= 8.4e+179) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (b * c) + (k * (j * (-27.0d0)))
t_2 = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
t_3 = (b * c) + ((-4.0d0) * (t * a))
if (a <= (-1.6d+39)) then
tmp = t_3
else if (a <= 6.5d-253) then
tmp = t_2
else if (a <= 8.4d-153) then
tmp = t_1
else if (a <= 2d-104) then
tmp = (((x * 18.0d0) * y) * z) * t
else if (a <= 1.8d-24) then
tmp = t_1
else if (a <= 3.9d+108) then
tmp = x * (t * (y * (18.0d0 * z)))
else if (a <= 8.4d+179) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (k * (j * -27.0));
double t_2 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double t_3 = (b * c) + (-4.0 * (t * a));
double tmp;
if (a <= -1.6e+39) {
tmp = t_3;
} else if (a <= 6.5e-253) {
tmp = t_2;
} else if (a <= 8.4e-153) {
tmp = t_1;
} else if (a <= 2e-104) {
tmp = (((x * 18.0) * y) * z) * t;
} else if (a <= 1.8e-24) {
tmp = t_1;
} else if (a <= 3.9e+108) {
tmp = x * (t * (y * (18.0 * z)));
} else if (a <= 8.4e+179) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (k * (j * -27.0)) t_2 = (-4.0 * (x * i)) + (-27.0 * (j * k)) t_3 = (b * c) + (-4.0 * (t * a)) tmp = 0 if a <= -1.6e+39: tmp = t_3 elif a <= 6.5e-253: tmp = t_2 elif a <= 8.4e-153: tmp = t_1 elif a <= 2e-104: tmp = (((x * 18.0) * y) * z) * t elif a <= 1.8e-24: tmp = t_1 elif a <= 3.9e+108: tmp = x * (t * (y * (18.0 * z))) elif a <= 8.4e+179: tmp = t_2 else: tmp = t_3 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) t_2 = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))) t_3 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (a <= -1.6e+39) tmp = t_3; elseif (a <= 6.5e-253) tmp = t_2; elseif (a <= 8.4e-153) tmp = t_1; elseif (a <= 2e-104) tmp = Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t); elseif (a <= 1.8e-24) tmp = t_1; elseif (a <= 3.9e+108) tmp = Float64(x * Float64(t * Float64(y * Float64(18.0 * z)))); elseif (a <= 8.4e+179) tmp = t_2; else tmp = t_3; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (k * (j * -27.0));
t_2 = (-4.0 * (x * i)) + (-27.0 * (j * k));
t_3 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (a <= -1.6e+39)
tmp = t_3;
elseif (a <= 6.5e-253)
tmp = t_2;
elseif (a <= 8.4e-153)
tmp = t_1;
elseif (a <= 2e-104)
tmp = (((x * 18.0) * y) * z) * t;
elseif (a <= 1.8e-24)
tmp = t_1;
elseif (a <= 3.9e+108)
tmp = x * (t * (y * (18.0 * z)));
elseif (a <= 8.4e+179)
tmp = t_2;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.6e+39], t$95$3, If[LessEqual[a, 6.5e-253], t$95$2, If[LessEqual[a, 8.4e-153], t$95$1, If[LessEqual[a, 2e-104], N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[a, 1.8e-24], t$95$1, If[LessEqual[a, 3.9e+108], N[(x * N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.4e+179], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + k \cdot \left(j \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
t_3 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;a \leq -1.6 \cdot 10^{+39}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-253}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 8.4 \cdot 10^{-153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-104}:\\
\;\;\;\;\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{+108}:\\
\;\;\;\;x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{elif}\;a \leq 8.4 \cdot 10^{+179}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -1.59999999999999996e39 or 8.3999999999999994e179 < a Initial program 82.7%
sub-neg82.7%
associate-+l-82.7%
sub-neg82.7%
sub-neg82.7%
distribute-rgt-out--86.1%
associate-*l*87.3%
distribute-lft-neg-in87.3%
cancel-sign-sub87.3%
associate-*l*87.3%
associate-*l*87.3%
Simplified87.3%
Taylor expanded in j around 0 76.2%
Taylor expanded in x around 0 60.2%
if -1.59999999999999996e39 < a < 6.4999999999999998e-253 or 3.89999999999999985e108 < a < 8.3999999999999994e179Initial program 85.5%
sub-neg85.5%
+-commutative85.5%
associate-*l*84.5%
distribute-rgt-neg-in84.5%
fma-def86.6%
*-commutative86.6%
distribute-rgt-neg-in86.6%
metadata-eval86.6%
sub-neg86.6%
+-commutative86.6%
associate-*l*86.6%
distribute-rgt-neg-in86.6%
Simplified83.6%
Taylor expanded in t around 0 65.1%
fma-def67.2%
associate-*r*67.2%
*-commutative67.2%
fma-def67.2%
associate-*r*67.2%
*-commutative67.2%
*-commutative67.2%
*-commutative67.2%
Simplified67.2%
Taylor expanded in c around 0 55.6%
if 6.4999999999999998e-253 < a < 8.40000000000000017e-153 or 1.99999999999999985e-104 < a < 1.8e-24Initial program 84.1%
sub-neg84.1%
*-commutative84.1%
distribute-rgt-neg-in84.1%
Simplified90.2%
fma-udef87.0%
fma-udef87.0%
associate-*l*87.1%
fma-udef87.1%
Applied egg-rr87.1%
Taylor expanded in b around inf 63.3%
if 8.40000000000000017e-153 < a < 1.99999999999999985e-104Initial program 93.5%
sub-neg93.5%
associate-+l-93.5%
sub-neg93.5%
sub-neg93.5%
distribute-rgt-out--93.5%
associate-*l*87.8%
distribute-lft-neg-in87.8%
cancel-sign-sub87.8%
associate-*l*87.8%
associate-*l*87.8%
Simplified87.8%
Taylor expanded in t around inf 69.3%
pow169.3%
*-commutative69.3%
Applied egg-rr69.3%
unpow169.3%
*-commutative69.3%
associate-*l*63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in x around inf 63.5%
*-commutative63.5%
*-commutative63.5%
associate-*l*69.4%
*-commutative69.4%
associate-*r*63.5%
*-commutative63.5%
associate-*r*63.6%
*-commutative63.6%
associate-*r*63.6%
*-commutative63.6%
associate-*l*69.3%
Simplified69.3%
if 1.8e-24 < a < 3.89999999999999985e108Initial program 88.7%
sub-neg88.7%
associate-+l-88.7%
sub-neg88.7%
sub-neg88.7%
distribute-rgt-out--88.7%
associate-*l*85.3%
distribute-lft-neg-in85.3%
cancel-sign-sub85.3%
associate-*l*85.3%
associate-*l*85.3%
Simplified85.3%
Taylor expanded in x around inf 66.3%
Taylor expanded in y around inf 51.9%
associate-*r*51.9%
*-commutative51.9%
associate-*r*51.9%
associate-*r*51.9%
*-commutative51.9%
associate-*r*51.9%
Simplified51.9%
Final simplification58.6%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* -4.0 (* x i)) (* -27.0 (* j k))))
(t_2 (+ (* b c) (* k (* j -27.0)))))
(if (<= t -1.15e+72)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t -5.2e-85)
t_2
(if (<= t -3.5e-123)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= t 2.45e-211)
t_1
(if (<= t 8e-72)
t_2
(if (<= t 1.12e+23)
t_1
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double t_2 = (b * c) + (k * (j * -27.0));
double tmp;
if (t <= -1.15e+72) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -5.2e-85) {
tmp = t_2;
} else if (t <= -3.5e-123) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 2.45e-211) {
tmp = t_1;
} else if (t <= 8e-72) {
tmp = t_2;
} else if (t <= 1.12e+23) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
t_2 = (b * c) + (k * (j * (-27.0d0)))
if (t <= (-1.15d+72)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= (-5.2d-85)) then
tmp = t_2
else if (t <= (-3.5d-123)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (t <= 2.45d-211) then
tmp = t_1
else if (t <= 8d-72) then
tmp = t_2
else if (t <= 1.12d+23) then
tmp = t_1
else
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double t_2 = (b * c) + (k * (j * -27.0));
double tmp;
if (t <= -1.15e+72) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -5.2e-85) {
tmp = t_2;
} else if (t <= -3.5e-123) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 2.45e-211) {
tmp = t_1;
} else if (t <= 8e-72) {
tmp = t_2;
} else if (t <= 1.12e+23) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k)) t_2 = (b * c) + (k * (j * -27.0)) tmp = 0 if t <= -1.15e+72: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= -5.2e-85: tmp = t_2 elif t <= -3.5e-123: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif t <= 2.45e-211: tmp = t_1 elif t <= 8e-72: tmp = t_2 elif t <= 1.12e+23: tmp = t_1 else: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))) t_2 = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) tmp = 0.0 if (t <= -1.15e+72) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= -5.2e-85) tmp = t_2; elseif (t <= -3.5e-123) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (t <= 2.45e-211) tmp = t_1; elseif (t <= 8e-72) tmp = t_2; elseif (t <= 1.12e+23) tmp = t_1; else tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
t_2 = (b * c) + (k * (j * -27.0));
tmp = 0.0;
if (t <= -1.15e+72)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= -5.2e-85)
tmp = t_2;
elseif (t <= -3.5e-123)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (t <= 2.45e-211)
tmp = t_1;
elseif (t <= 8e-72)
tmp = t_2;
elseif (t <= 1.12e+23)
tmp = t_1;
else
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.15e+72], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.2e-85], t$95$2, If[LessEqual[t, -3.5e-123], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.45e-211], t$95$1, If[LessEqual[t, 8e-72], t$95$2, If[LessEqual[t, 1.12e+23], t$95$1, N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;t \leq -1.15 \cdot 10^{+72}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-85}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-123}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-211}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-72}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.15e72Initial program 76.8%
sub-neg76.8%
associate-+l-76.8%
sub-neg76.8%
sub-neg76.8%
distribute-rgt-out--78.8%
associate-*l*78.8%
distribute-lft-neg-in78.8%
cancel-sign-sub78.8%
associate-*l*78.8%
associate-*l*78.8%
Simplified78.8%
Taylor expanded in t around inf 74.1%
pow174.1%
*-commutative74.1%
Applied egg-rr74.1%
unpow174.1%
*-commutative74.1%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
if -1.15e72 < t < -5.20000000000000023e-85 or 2.45000000000000016e-211 < t < 7.9999999999999997e-72Initial program 94.6%
sub-neg94.6%
*-commutative94.6%
distribute-rgt-neg-in94.6%
Simplified94.6%
fma-udef94.6%
fma-udef94.6%
associate-*l*94.6%
fma-udef94.6%
Applied egg-rr94.6%
Taylor expanded in b around inf 67.0%
if -5.20000000000000023e-85 < t < -3.4999999999999999e-123Initial program 82.8%
sub-neg82.8%
associate-+l-82.8%
sub-neg82.8%
sub-neg82.8%
distribute-rgt-out--82.8%
associate-*l*82.8%
distribute-lft-neg-in82.8%
cancel-sign-sub82.8%
associate-*l*82.8%
associate-*l*82.8%
Simplified82.8%
Taylor expanded in x around inf 68.4%
if -3.4999999999999999e-123 < t < 2.45000000000000016e-211 or 7.9999999999999997e-72 < t < 1.12e23Initial program 86.2%
sub-neg86.2%
+-commutative86.2%
associate-*l*86.2%
distribute-rgt-neg-in86.2%
fma-def89.3%
*-commutative89.3%
distribute-rgt-neg-in89.3%
metadata-eval89.3%
sub-neg89.3%
+-commutative89.3%
associate-*l*89.3%
distribute-rgt-neg-in89.3%
Simplified87.7%
Taylor expanded in t around 0 81.3%
fma-def84.4%
associate-*r*84.4%
*-commutative84.4%
fma-def84.4%
associate-*r*84.4%
*-commutative84.4%
*-commutative84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in c around 0 68.0%
if 1.12e23 < t Initial program 83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
sub-neg83.6%
distribute-rgt-out--86.3%
associate-*l*81.2%
distribute-lft-neg-in81.2%
cancel-sign-sub81.2%
associate-*l*81.2%
associate-*l*81.2%
Simplified81.2%
Taylor expanded in t around inf 72.9%
Final simplification70.4%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* -4.0 (* x i)) (* -27.0 (* j k)))))
(if (<= t -1.45e+71)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t -6e-85)
(+ (* b c) (* k (* j -27.0)))
(if (<= t -2.4e-123)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= t 1.9e-172)
t_1
(if (<= t 3.2e-86)
(+ (* b c) (* (* 18.0 y) (* t (* x z))))
(if (<= t 1.05e+23)
t_1
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double tmp;
if (t <= -1.45e+71) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -6e-85) {
tmp = (b * c) + (k * (j * -27.0));
} else if (t <= -2.4e-123) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 1.9e-172) {
tmp = t_1;
} else if (t <= 3.2e-86) {
tmp = (b * c) + ((18.0 * y) * (t * (x * z)));
} else if (t <= 1.05e+23) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
if (t <= (-1.45d+71)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= (-6d-85)) then
tmp = (b * c) + (k * (j * (-27.0d0)))
else if (t <= (-2.4d-123)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (t <= 1.9d-172) then
tmp = t_1
else if (t <= 3.2d-86) then
tmp = (b * c) + ((18.0d0 * y) * (t * (x * z)))
else if (t <= 1.05d+23) then
tmp = t_1
else
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double tmp;
if (t <= -1.45e+71) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -6e-85) {
tmp = (b * c) + (k * (j * -27.0));
} else if (t <= -2.4e-123) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 1.9e-172) {
tmp = t_1;
} else if (t <= 3.2e-86) {
tmp = (b * c) + ((18.0 * y) * (t * (x * z)));
} else if (t <= 1.05e+23) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k)) tmp = 0 if t <= -1.45e+71: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= -6e-85: tmp = (b * c) + (k * (j * -27.0)) elif t <= -2.4e-123: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif t <= 1.9e-172: tmp = t_1 elif t <= 3.2e-86: tmp = (b * c) + ((18.0 * y) * (t * (x * z))) elif t <= 1.05e+23: tmp = t_1 else: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))) tmp = 0.0 if (t <= -1.45e+71) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= -6e-85) tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); elseif (t <= -2.4e-123) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (t <= 1.9e-172) tmp = t_1; elseif (t <= 3.2e-86) tmp = Float64(Float64(b * c) + Float64(Float64(18.0 * y) * Float64(t * Float64(x * z)))); elseif (t <= 1.05e+23) tmp = t_1; else tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
tmp = 0.0;
if (t <= -1.45e+71)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= -6e-85)
tmp = (b * c) + (k * (j * -27.0));
elseif (t <= -2.4e-123)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (t <= 1.9e-172)
tmp = t_1;
elseif (t <= 3.2e-86)
tmp = (b * c) + ((18.0 * y) * (t * (x * z)));
elseif (t <= 1.05e+23)
tmp = t_1;
else
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e+71], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6e-85], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.4e-123], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-172], t$95$1, If[LessEqual[t, 3.2e-86], N[(N[(b * c), $MachinePrecision] + N[(N[(18.0 * y), $MachinePrecision] * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+23], t$95$1, N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -1.45 \cdot 10^{+71}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-85}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-123}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-172}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-86}:\\
\;\;\;\;b \cdot c + \left(18 \cdot y\right) \cdot \left(t \cdot \left(x \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.45000000000000004e71Initial program 76.8%
sub-neg76.8%
associate-+l-76.8%
sub-neg76.8%
sub-neg76.8%
distribute-rgt-out--78.8%
associate-*l*78.8%
distribute-lft-neg-in78.8%
cancel-sign-sub78.8%
associate-*l*78.8%
associate-*l*78.8%
Simplified78.8%
Taylor expanded in t around inf 74.1%
pow174.1%
*-commutative74.1%
Applied egg-rr74.1%
unpow174.1%
*-commutative74.1%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
if -1.45000000000000004e71 < t < -6.00000000000000044e-85Initial program 97.2%
sub-neg97.2%
*-commutative97.2%
distribute-rgt-neg-in97.2%
Simplified97.1%
fma-udef97.1%
fma-udef97.1%
associate-*l*97.1%
fma-udef97.1%
Applied egg-rr97.1%
Taylor expanded in b around inf 66.5%
if -6.00000000000000044e-85 < t < -2.4e-123Initial program 82.8%
sub-neg82.8%
associate-+l-82.8%
sub-neg82.8%
sub-neg82.8%
distribute-rgt-out--82.8%
associate-*l*82.8%
distribute-lft-neg-in82.8%
cancel-sign-sub82.8%
associate-*l*82.8%
associate-*l*82.8%
Simplified82.8%
Taylor expanded in x around inf 68.4%
if -2.4e-123 < t < 1.89999999999999993e-172 or 3.20000000000000006e-86 < t < 1.0500000000000001e23Initial program 87.9%
sub-neg87.9%
+-commutative87.9%
associate-*l*87.9%
distribute-rgt-neg-in87.9%
fma-def90.6%
*-commutative90.6%
distribute-rgt-neg-in90.6%
metadata-eval90.6%
sub-neg90.6%
+-commutative90.6%
associate-*l*90.6%
distribute-rgt-neg-in90.6%
Simplified89.2%
Taylor expanded in t around 0 82.2%
fma-def84.9%
associate-*r*84.9%
*-commutative84.9%
fma-def84.9%
associate-*r*85.0%
*-commutative85.0%
*-commutative85.0%
*-commutative85.0%
Simplified85.0%
Taylor expanded in c around 0 66.6%
if 1.89999999999999993e-172 < t < 3.20000000000000006e-86Initial program 78.9%
sub-neg78.9%
associate-+l-78.9%
sub-neg78.9%
sub-neg78.9%
distribute-rgt-out--78.9%
associate-*l*78.9%
distribute-lft-neg-in78.9%
cancel-sign-sub78.9%
associate-*l*78.9%
associate-*l*78.9%
Simplified78.9%
Taylor expanded in j around 0 67.8%
Taylor expanded in i around 0 67.8%
Taylor expanded in y around inf 88.7%
associate-*r*88.7%
Simplified88.7%
if 1.0500000000000001e23 < t Initial program 83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
sub-neg83.6%
distribute-rgt-out--86.3%
associate-*l*81.2%
distribute-lft-neg-in81.2%
cancel-sign-sub81.2%
associate-*l*81.2%
associate-*l*81.2%
Simplified81.2%
Taylor expanded in t around inf 72.9%
Final simplification70.8%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* t (- (* a 4.0) (* 18.0 (* y (* x z))))))))
(if (<= t -3.3e+96)
t_1
(if (<= t -2.45e-85)
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(if (<= t -9.2e-116)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= t 280.0)
(- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
t_1))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (t * ((a * 4.0) - (18.0 * (y * (x * z)))));
double tmp;
if (t <= -3.3e+96) {
tmp = t_1;
} else if (t <= -2.45e-85) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if (t <= -9.2e-116) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 280.0) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - (t * ((a * 4.0d0) - (18.0d0 * (y * (x * z)))))
if (t <= (-3.3d+96)) then
tmp = t_1
else if (t <= (-2.45d-85)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else if (t <= (-9.2d-116)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (t <= 280.0d0) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = t_1
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (t * ((a * 4.0) - (18.0 * (y * (x * z)))));
double tmp;
if (t <= -3.3e+96) {
tmp = t_1;
} else if (t <= -2.45e-85) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if (t <= -9.2e-116) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 280.0) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t_1;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (t * ((a * 4.0) - (18.0 * (y * (x * z))))) tmp = 0 if t <= -3.3e+96: tmp = t_1 elif t <= -2.45e-85: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) elif t <= -9.2e-116: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif t <= 280.0: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = t_1 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(t * Float64(Float64(a * 4.0) - Float64(18.0 * Float64(y * Float64(x * z)))))) tmp = 0.0 if (t <= -3.3e+96) tmp = t_1; elseif (t <= -2.45e-85) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); elseif (t <= -9.2e-116) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (t <= 280.0) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = t_1; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (t * ((a * 4.0) - (18.0 * (y * (x * z)))));
tmp = 0.0;
if (t <= -3.3e+96)
tmp = t_1;
elseif (t <= -2.45e-85)
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
elseif (t <= -9.2e-116)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (t <= 280.0)
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(t * N[(N[(a * 4.0), $MachinePrecision] - N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+96], t$95$1, If[LessEqual[t, -2.45e-85], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.2e-116], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 280.0], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - t \cdot \left(a \cdot 4 - 18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.45 \cdot 10^{-85}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{-116}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 280:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.29999999999999984e96 or 280 < t Initial program 80.3%
sub-neg80.3%
associate-+l-80.3%
sub-neg80.3%
sub-neg80.3%
distribute-rgt-out--82.6%
associate-*l*79.7%
distribute-lft-neg-in79.7%
cancel-sign-sub79.7%
associate-*l*79.7%
associate-*l*79.7%
Simplified79.7%
Taylor expanded in j around 0 76.8%
Taylor expanded in i around 0 76.8%
if -3.29999999999999984e96 < t < -2.45000000000000007e-85Initial program 94.9%
Taylor expanded in x around 0 78.6%
if -2.45000000000000007e-85 < t < -9.20000000000000006e-116Initial program 89.5%
sub-neg89.5%
associate-+l-89.5%
sub-neg89.5%
sub-neg89.5%
distribute-rgt-out--89.5%
associate-*l*89.5%
distribute-lft-neg-in89.5%
cancel-sign-sub89.5%
associate-*l*89.5%
associate-*l*89.5%
Simplified89.5%
Taylor expanded in x around inf 72.5%
if -9.20000000000000006e-116 < t < 280Initial program 87.7%
sub-neg87.7%
associate-+l-87.7%
sub-neg87.7%
sub-neg87.7%
distribute-rgt-out--87.7%
associate-*l*87.7%
distribute-lft-neg-in87.7%
cancel-sign-sub87.7%
associate-*l*87.7%
associate-*l*87.7%
Simplified87.7%
Taylor expanded in t around 0 80.1%
Final simplification78.0%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))) (t_2 (* 18.0 (* y (* t (* x z))))))
(if (<= y -4.2e+232)
t_2
(if (<= y -9e+223)
t_1
(if (<= y -4e+74)
t_2
(if (<= y -2.9e-46)
(* k (* j -27.0))
(if (<= y -1.75e-127)
(* x (* i -4.0))
(if (<= y 8.5e-308)
(* j (* k -27.0))
(if (<= y 0.0145) t_1 t_2)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double t_2 = 18.0 * (y * (t * (x * z)));
double tmp;
if (y <= -4.2e+232) {
tmp = t_2;
} else if (y <= -9e+223) {
tmp = t_1;
} else if (y <= -4e+74) {
tmp = t_2;
} else if (y <= -2.9e-46) {
tmp = k * (j * -27.0);
} else if (y <= -1.75e-127) {
tmp = x * (i * -4.0);
} else if (y <= 8.5e-308) {
tmp = j * (k * -27.0);
} else if (y <= 0.0145) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
t_2 = 18.0d0 * (y * (t * (x * z)))
if (y <= (-4.2d+232)) then
tmp = t_2
else if (y <= (-9d+223)) then
tmp = t_1
else if (y <= (-4d+74)) then
tmp = t_2
else if (y <= (-2.9d-46)) then
tmp = k * (j * (-27.0d0))
else if (y <= (-1.75d-127)) then
tmp = x * (i * (-4.0d0))
else if (y <= 8.5d-308) then
tmp = j * (k * (-27.0d0))
else if (y <= 0.0145d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double t_2 = 18.0 * (y * (t * (x * z)));
double tmp;
if (y <= -4.2e+232) {
tmp = t_2;
} else if (y <= -9e+223) {
tmp = t_1;
} else if (y <= -4e+74) {
tmp = t_2;
} else if (y <= -2.9e-46) {
tmp = k * (j * -27.0);
} else if (y <= -1.75e-127) {
tmp = x * (i * -4.0);
} else if (y <= 8.5e-308) {
tmp = j * (k * -27.0);
} else if (y <= 0.0145) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) t_2 = 18.0 * (y * (t * (x * z))) tmp = 0 if y <= -4.2e+232: tmp = t_2 elif y <= -9e+223: tmp = t_1 elif y <= -4e+74: tmp = t_2 elif y <= -2.9e-46: tmp = k * (j * -27.0) elif y <= -1.75e-127: tmp = x * (i * -4.0) elif y <= 8.5e-308: tmp = j * (k * -27.0) elif y <= 0.0145: tmp = t_1 else: tmp = t_2 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) t_2 = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) tmp = 0.0 if (y <= -4.2e+232) tmp = t_2; elseif (y <= -9e+223) tmp = t_1; elseif (y <= -4e+74) tmp = t_2; elseif (y <= -2.9e-46) tmp = Float64(k * Float64(j * -27.0)); elseif (y <= -1.75e-127) tmp = Float64(x * Float64(i * -4.0)); elseif (y <= 8.5e-308) tmp = Float64(j * Float64(k * -27.0)); elseif (y <= 0.0145) tmp = t_1; else tmp = t_2; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * (a * -4.0);
t_2 = 18.0 * (y * (t * (x * z)));
tmp = 0.0;
if (y <= -4.2e+232)
tmp = t_2;
elseif (y <= -9e+223)
tmp = t_1;
elseif (y <= -4e+74)
tmp = t_2;
elseif (y <= -2.9e-46)
tmp = k * (j * -27.0);
elseif (y <= -1.75e-127)
tmp = x * (i * -4.0);
elseif (y <= 8.5e-308)
tmp = j * (k * -27.0);
elseif (y <= 0.0145)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.2e+232], t$95$2, If[LessEqual[y, -9e+223], t$95$1, If[LessEqual[y, -4e+74], t$95$2, If[LessEqual[y, -2.9e-46], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.75e-127], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.5e-308], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0145], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+232}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{+74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-46}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;y \leq -1.75 \cdot 10^{-127}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-308}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;y \leq 0.0145:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.19999999999999982e232 or -9e223 < y < -3.99999999999999981e74 or 0.0145000000000000007 < y Initial program 77.3%
sub-neg77.3%
associate-+l-77.3%
sub-neg77.3%
sub-neg77.3%
distribute-rgt-out--79.2%
associate-*l*76.5%
distribute-lft-neg-in76.5%
cancel-sign-sub76.5%
associate-*l*76.5%
associate-*l*76.6%
Simplified76.6%
Taylor expanded in t around inf 57.1%
Taylor expanded in y around inf 55.1%
if -4.19999999999999982e232 < y < -9e223 or 8.49999999999999972e-308 < y < 0.0145000000000000007Initial program 88.0%
sub-neg88.0%
associate-+l-88.0%
sub-neg88.0%
sub-neg88.0%
distribute-rgt-out--88.0%
associate-*l*88.0%
distribute-lft-neg-in88.0%
cancel-sign-sub88.0%
associate-*l*88.0%
associate-*l*88.0%
Simplified88.0%
Taylor expanded in t around inf 39.3%
Taylor expanded in y around 0 30.8%
if -3.99999999999999981e74 < y < -2.90000000000000005e-46Initial program 91.7%
sub-neg91.7%
+-commutative91.7%
associate-*l*91.7%
distribute-rgt-neg-in91.7%
fma-def91.7%
*-commutative91.7%
distribute-rgt-neg-in91.7%
metadata-eval91.7%
sub-neg91.7%
+-commutative91.7%
associate-*l*91.7%
distribute-rgt-neg-in91.7%
Simplified95.8%
Taylor expanded in j around inf 30.7%
associate-*r*30.7%
*-commutative30.7%
*-commutative30.7%
*-commutative30.7%
Simplified30.7%
Taylor expanded in j around 0 30.7%
*-commutative30.7%
associate-*r*30.7%
Simplified30.7%
if -2.90000000000000005e-46 < y < -1.74999999999999995e-127Initial program 99.9%
sub-neg99.9%
associate-+l-99.9%
sub-neg99.9%
sub-neg99.9%
distribute-rgt-out--99.9%
associate-*l*100.0%
distribute-lft-neg-in100.0%
cancel-sign-sub100.0%
associate-*l*100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around inf 41.7%
Taylor expanded in y around 0 18.3%
if -1.74999999999999995e-127 < y < 8.49999999999999972e-308Initial program 96.1%
sub-neg96.1%
+-commutative96.1%
associate-*l*96.1%
distribute-rgt-neg-in96.1%
fma-def96.1%
*-commutative96.1%
distribute-rgt-neg-in96.1%
metadata-eval96.1%
sub-neg96.1%
+-commutative96.1%
associate-*l*96.1%
distribute-rgt-neg-in96.1%
Simplified92.7%
Taylor expanded in j around inf 42.0%
associate-*r*42.0%
*-commutative42.0%
*-commutative42.0%
*-commutative42.0%
Simplified42.0%
Final simplification41.7%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a))) (t_2 (+ (* b c) t_1)))
(if (<= k -3.8e-59)
(+ (* -4.0 (* x i)) (* -27.0 (* j k)))
(if (<= k 7e-174)
t_2
(if (<= k 4.6e-130)
(* x (* 18.0 (* y (* z t))))
(if (<= k 1.09e-44)
t_2
(if (<= k 1700000.0)
(* x (* (* z t) (* 18.0 y)))
(if (<= k 3600000.0) (* b c) (- t_1 (* 27.0 (* j k)))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = (b * c) + t_1;
double tmp;
if (k <= -3.8e-59) {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
} else if (k <= 7e-174) {
tmp = t_2;
} else if (k <= 4.6e-130) {
tmp = x * (18.0 * (y * (z * t)));
} else if (k <= 1.09e-44) {
tmp = t_2;
} else if (k <= 1700000.0) {
tmp = x * ((z * t) * (18.0 * y));
} else if (k <= 3600000.0) {
tmp = b * c;
} else {
tmp = t_1 - (27.0 * (j * k));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = (b * c) + t_1
if (k <= (-3.8d-59)) then
tmp = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
else if (k <= 7d-174) then
tmp = t_2
else if (k <= 4.6d-130) then
tmp = x * (18.0d0 * (y * (z * t)))
else if (k <= 1.09d-44) then
tmp = t_2
else if (k <= 1700000.0d0) then
tmp = x * ((z * t) * (18.0d0 * y))
else if (k <= 3600000.0d0) then
tmp = b * c
else
tmp = t_1 - (27.0d0 * (j * k))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = (b * c) + t_1;
double tmp;
if (k <= -3.8e-59) {
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
} else if (k <= 7e-174) {
tmp = t_2;
} else if (k <= 4.6e-130) {
tmp = x * (18.0 * (y * (z * t)));
} else if (k <= 1.09e-44) {
tmp = t_2;
} else if (k <= 1700000.0) {
tmp = x * ((z * t) * (18.0 * y));
} else if (k <= 3600000.0) {
tmp = b * c;
} else {
tmp = t_1 - (27.0 * (j * k));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = (b * c) + t_1 tmp = 0 if k <= -3.8e-59: tmp = (-4.0 * (x * i)) + (-27.0 * (j * k)) elif k <= 7e-174: tmp = t_2 elif k <= 4.6e-130: tmp = x * (18.0 * (y * (z * t))) elif k <= 1.09e-44: tmp = t_2 elif k <= 1700000.0: tmp = x * ((z * t) * (18.0 * y)) elif k <= 3600000.0: tmp = b * c else: tmp = t_1 - (27.0 * (j * k)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (k <= -3.8e-59) tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))); elseif (k <= 7e-174) tmp = t_2; elseif (k <= 4.6e-130) tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); elseif (k <= 1.09e-44) tmp = t_2; elseif (k <= 1700000.0) tmp = Float64(x * Float64(Float64(z * t) * Float64(18.0 * y))); elseif (k <= 3600000.0) tmp = Float64(b * c); else tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = (b * c) + t_1;
tmp = 0.0;
if (k <= -3.8e-59)
tmp = (-4.0 * (x * i)) + (-27.0 * (j * k));
elseif (k <= 7e-174)
tmp = t_2;
elseif (k <= 4.6e-130)
tmp = x * (18.0 * (y * (z * t)));
elseif (k <= 1.09e-44)
tmp = t_2;
elseif (k <= 1700000.0)
tmp = x * ((z * t) * (18.0 * y));
elseif (k <= 3600000.0)
tmp = b * c;
else
tmp = t_1 - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[k, -3.8e-59], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7e-174], t$95$2, If[LessEqual[k, 4.6e-130], N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.09e-44], t$95$2, If[LessEqual[k, 1700000.0], N[(x * N[(N[(z * t), $MachinePrecision] * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3600000.0], N[(b * c), $MachinePrecision], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := b \cdot c + t_1\\
\mathbf{if}\;k \leq -3.8 \cdot 10^{-59}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq 7 \cdot 10^{-174}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;k \leq 4.6 \cdot 10^{-130}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;k \leq 1.09 \cdot 10^{-44}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;k \leq 1700000:\\
\;\;\;\;x \cdot \left(\left(z \cdot t\right) \cdot \left(18 \cdot y\right)\right)\\
\mathbf{elif}\;k \leq 3600000:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t_1 - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -3.79999999999999983e-59Initial program 84.7%
sub-neg84.7%
+-commutative84.7%
associate-*l*84.8%
distribute-rgt-neg-in84.8%
fma-def89.5%
*-commutative89.5%
distribute-rgt-neg-in89.5%
metadata-eval89.5%
sub-neg89.5%
+-commutative89.5%
associate-*l*89.5%
distribute-rgt-neg-in89.5%
Simplified91.8%
Taylor expanded in t around 0 58.1%
fma-def60.4%
associate-*r*60.4%
*-commutative60.4%
fma-def60.4%
associate-*r*60.4%
*-commutative60.4%
*-commutative60.4%
*-commutative60.4%
Simplified60.4%
Taylor expanded in c around 0 49.7%
if -3.79999999999999983e-59 < k < 6.99999999999999975e-174 or 4.6000000000000002e-130 < k < 1.09e-44Initial program 88.5%
sub-neg88.5%
associate-+l-88.5%
sub-neg88.5%
sub-neg88.5%
distribute-rgt-out--88.5%
associate-*l*87.5%
distribute-lft-neg-in87.5%
cancel-sign-sub87.5%
associate-*l*87.5%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in j around 0 84.8%
Taylor expanded in x around 0 53.0%
if 6.99999999999999975e-174 < k < 4.6000000000000002e-130Initial program 56.7%
sub-neg56.7%
associate-+l-56.7%
sub-neg56.7%
sub-neg56.7%
distribute-rgt-out--56.7%
associate-*l*56.7%
distribute-lft-neg-in56.7%
cancel-sign-sub56.7%
associate-*l*56.7%
associate-*l*56.7%
Simplified56.7%
Taylor expanded in x around inf 93.8%
Taylor expanded in y around inf 78.3%
if 1.09e-44 < k < 1.7e6Initial program 93.2%
sub-neg93.2%
associate-+l-93.2%
sub-neg93.2%
sub-neg93.2%
distribute-rgt-out--93.2%
associate-*l*87.1%
distribute-lft-neg-in87.1%
cancel-sign-sub87.1%
associate-*l*87.1%
associate-*l*87.1%
Simplified87.1%
Taylor expanded in x around inf 61.0%
Taylor expanded in y around inf 54.7%
associate-*r*54.8%
*-commutative54.8%
Simplified54.8%
if 1.7e6 < k < 3.6e6Initial program 85.2%
sub-neg85.2%
associate-+l-85.2%
sub-neg85.2%
sub-neg85.2%
distribute-rgt-out--86.4%
associate-*l*84.9%
distribute-lft-neg-in84.9%
cancel-sign-sub84.9%
associate-*l*84.9%
associate-*l*84.9%
Simplified84.9%
Taylor expanded in j around 0 68.6%
Taylor expanded in c around inf 20.4%
if 3.6e6 < k Initial program 83.4%
Taylor expanded in t around -inf 77.0%
Taylor expanded in y around 0 67.1%
Final simplification56.2%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* -4.0 (* x i)) (* -27.0 (* j k))))
(t_2 (+ (* b c) (* k (* j -27.0))))
(t_3 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -2.2e+71)
t_3
(if (<= t -1.7e-77)
t_2
(if (<= t 4.4e-211)
t_1
(if (<= t 3.3e-69) t_2 (if (<= t 9.6e+22) t_1 t_3)))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double t_2 = (b * c) + (k * (j * -27.0));
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -2.2e+71) {
tmp = t_3;
} else if (t <= -1.7e-77) {
tmp = t_2;
} else if (t <= 4.4e-211) {
tmp = t_1;
} else if (t <= 3.3e-69) {
tmp = t_2;
} else if (t <= 9.6e+22) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
t_2 = (b * c) + (k * (j * (-27.0d0)))
t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-2.2d+71)) then
tmp = t_3
else if (t <= (-1.7d-77)) then
tmp = t_2
else if (t <= 4.4d-211) then
tmp = t_1
else if (t <= 3.3d-69) then
tmp = t_2
else if (t <= 9.6d+22) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double t_2 = (b * c) + (k * (j * -27.0));
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -2.2e+71) {
tmp = t_3;
} else if (t <= -1.7e-77) {
tmp = t_2;
} else if (t <= 4.4e-211) {
tmp = t_1;
} else if (t <= 3.3e-69) {
tmp = t_2;
} else if (t <= 9.6e+22) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k)) t_2 = (b * c) + (k * (j * -27.0)) t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -2.2e+71: tmp = t_3 elif t <= -1.7e-77: tmp = t_2 elif t <= 4.4e-211: tmp = t_1 elif t <= 3.3e-69: tmp = t_2 elif t <= 9.6e+22: tmp = t_1 else: tmp = t_3 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))) t_2 = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) t_3 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -2.2e+71) tmp = t_3; elseif (t <= -1.7e-77) tmp = t_2; elseif (t <= 4.4e-211) tmp = t_1; elseif (t <= 3.3e-69) tmp = t_2; elseif (t <= 9.6e+22) tmp = t_1; else tmp = t_3; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
t_2 = (b * c) + (k * (j * -27.0));
t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -2.2e+71)
tmp = t_3;
elseif (t <= -1.7e-77)
tmp = t_2;
elseif (t <= 4.4e-211)
tmp = t_1;
elseif (t <= 3.3e-69)
tmp = t_2;
elseif (t <= 9.6e+22)
tmp = t_1;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e+71], t$95$3, If[LessEqual[t, -1.7e-77], t$95$2, If[LessEqual[t, 4.4e-211], t$95$1, If[LessEqual[t, 3.3e-69], t$95$2, If[LessEqual[t, 9.6e+22], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c + k \cdot \left(j \cdot -27\right)\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{+71}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-211}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -2.19999999999999995e71 or 9.6e22 < t Initial program 80.8%
sub-neg80.8%
associate-+l-80.8%
sub-neg80.8%
sub-neg80.8%
distribute-rgt-out--83.2%
associate-*l*80.2%
distribute-lft-neg-in80.2%
cancel-sign-sub80.2%
associate-*l*80.2%
associate-*l*80.2%
Simplified80.2%
Taylor expanded in t around inf 73.4%
pow173.4%
*-commutative73.4%
Applied egg-rr73.4%
unpow173.4%
*-commutative73.4%
associate-*l*71.9%
*-commutative71.9%
Simplified71.9%
if -2.19999999999999995e71 < t < -1.69999999999999991e-77 or 4.39999999999999996e-211 < t < 3.3e-69Initial program 94.4%
sub-neg94.4%
*-commutative94.4%
distribute-rgt-neg-in94.4%
Simplified96.3%
fma-udef96.3%
fma-udef96.3%
associate-*l*96.3%
fma-udef96.3%
Applied egg-rr96.3%
Taylor expanded in b around inf 65.7%
if -1.69999999999999991e-77 < t < 4.39999999999999996e-211 or 3.3e-69 < t < 9.6e22Initial program 86.1%
sub-neg86.1%
+-commutative86.1%
associate-*l*86.1%
distribute-rgt-neg-in86.1%
fma-def88.6%
*-commutative88.6%
distribute-rgt-neg-in88.6%
metadata-eval88.6%
sub-neg88.6%
+-commutative88.6%
associate-*l*88.6%
distribute-rgt-neg-in88.6%
Simplified86.0%
Taylor expanded in t around 0 75.8%
fma-def78.4%
associate-*r*78.4%
*-commutative78.4%
fma-def78.4%
associate-*r*78.4%
*-commutative78.4%
*-commutative78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in c around 0 62.2%
Final simplification67.7%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* -4.0 (* x i)) (* -27.0 (* j k))))
(t_2 (+ (* b c) (* k (* j -27.0)))))
(if (<= t -4.25e+74)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t -1e-76)
t_2
(if (<= t 2.75e-211)
t_1
(if (<= t 2.6e-79)
t_2
(if (<= t 1.26e+23)
t_1
(* t (- (* 18.0 (* y (* x z))) (* a 4.0))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double t_2 = (b * c) + (k * (j * -27.0));
double tmp;
if (t <= -4.25e+74) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -1e-76) {
tmp = t_2;
} else if (t <= 2.75e-211) {
tmp = t_1;
} else if (t <= 2.6e-79) {
tmp = t_2;
} else if (t <= 1.26e+23) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((-4.0d0) * (x * i)) + ((-27.0d0) * (j * k))
t_2 = (b * c) + (k * (j * (-27.0d0)))
if (t <= (-4.25d+74)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= (-1d-76)) then
tmp = t_2
else if (t <= 2.75d-211) then
tmp = t_1
else if (t <= 2.6d-79) then
tmp = t_2
else if (t <= 1.26d+23) then
tmp = t_1
else
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
double t_2 = (b * c) + (k * (j * -27.0));
double tmp;
if (t <= -4.25e+74) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -1e-76) {
tmp = t_2;
} else if (t <= 2.75e-211) {
tmp = t_1;
} else if (t <= 2.6e-79) {
tmp = t_2;
} else if (t <= 1.26e+23) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k)) t_2 = (b * c) + (k * (j * -27.0)) tmp = 0 if t <= -4.25e+74: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= -1e-76: tmp = t_2 elif t <= 2.75e-211: tmp = t_1 elif t <= 2.6e-79: tmp = t_2 elif t <= 1.26e+23: tmp = t_1 else: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(-4.0 * Float64(x * i)) + Float64(-27.0 * Float64(j * k))) t_2 = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))) tmp = 0.0 if (t <= -4.25e+74) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= -1e-76) tmp = t_2; elseif (t <= 2.75e-211) tmp = t_1; elseif (t <= 2.6e-79) tmp = t_2; elseif (t <= 1.26e+23) tmp = t_1; else tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (-4.0 * (x * i)) + (-27.0 * (j * k));
t_2 = (b * c) + (k * (j * -27.0));
tmp = 0.0;
if (t <= -4.25e+74)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= -1e-76)
tmp = t_2;
elseif (t <= 2.75e-211)
tmp = t_1;
elseif (t <= 2.6e-79)
tmp = t_2;
elseif (t <= 1.26e+23)
tmp = t_1;
else
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.25e+74], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1e-76], t$95$2, If[LessEqual[t, 2.75e-211], t$95$1, If[LessEqual[t, 2.6e-79], t$95$2, If[LessEqual[t, 1.26e+23], t$95$1, N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right) + -27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;t \leq -4.25 \cdot 10^{+74}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{-211}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-79}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -4.25000000000000014e74Initial program 76.8%
sub-neg76.8%
associate-+l-76.8%
sub-neg76.8%
sub-neg76.8%
distribute-rgt-out--78.8%
associate-*l*78.8%
distribute-lft-neg-in78.8%
cancel-sign-sub78.8%
associate-*l*78.8%
associate-*l*78.8%
Simplified78.8%
Taylor expanded in t around inf 74.1%
pow174.1%
*-commutative74.1%
Applied egg-rr74.1%
unpow174.1%
*-commutative74.1%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
if -4.25000000000000014e74 < t < -9.99999999999999927e-77 or 2.74999999999999987e-211 < t < 2.59999999999999994e-79Initial program 94.4%
sub-neg94.4%
*-commutative94.4%
distribute-rgt-neg-in94.4%
Simplified96.3%
fma-udef96.3%
fma-udef96.3%
associate-*l*96.3%
fma-udef96.3%
Applied egg-rr96.3%
Taylor expanded in b around inf 65.7%
if -9.99999999999999927e-77 < t < 2.74999999999999987e-211 or 2.59999999999999994e-79 < t < 1.26000000000000004e23Initial program 86.1%
sub-neg86.1%
+-commutative86.1%
associate-*l*86.1%
distribute-rgt-neg-in86.1%
fma-def88.6%
*-commutative88.6%
distribute-rgt-neg-in88.6%
metadata-eval88.6%
sub-neg88.6%
+-commutative88.6%
associate-*l*88.6%
distribute-rgt-neg-in88.6%
Simplified86.0%
Taylor expanded in t around 0 75.8%
fma-def78.4%
associate-*r*78.4%
*-commutative78.4%
fma-def78.4%
associate-*r*78.4%
*-commutative78.4%
*-commutative78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in c around 0 62.2%
if 1.26000000000000004e23 < t Initial program 83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
sub-neg83.6%
distribute-rgt-out--86.3%
associate-*l*81.2%
distribute-lft-neg-in81.2%
cancel-sign-sub81.2%
associate-*l*81.2%
associate-*l*81.2%
Simplified81.2%
Taylor expanded in t around inf 72.9%
Final simplification68.4%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))))
(if (<= t -1.26e+78)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= t -3.2e-89)
t_1
(if (<= t -1.25e-122)
(+ (* b c) (* (* 18.0 y) (* t (* x z))))
(if (<= t 1.32e+23)
t_1
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double tmp;
if (t <= -1.26e+78) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -3.2e-89) {
tmp = t_1;
} else if (t <= -1.25e-122) {
tmp = (b * c) + ((18.0 * y) * (t * (x * z)));
} else if (t <= 1.32e+23) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
if (t <= (-1.26d+78)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (t <= (-3.2d-89)) then
tmp = t_1
else if (t <= (-1.25d-122)) then
tmp = (b * c) + ((18.0d0 * y) * (t * (x * z)))
else if (t <= 1.32d+23) then
tmp = t_1
else
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
double tmp;
if (t <= -1.26e+78) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (t <= -3.2e-89) {
tmp = t_1;
} else if (t <= -1.25e-122) {
tmp = (b * c) + ((18.0 * y) * (t * (x * z)));
} else if (t <= 1.32e+23) {
tmp = t_1;
} else {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) tmp = 0 if t <= -1.26e+78: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif t <= -3.2e-89: tmp = t_1 elif t <= -1.25e-122: tmp = (b * c) + ((18.0 * y) * (t * (x * z))) elif t <= 1.32e+23: tmp = t_1 else: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))) tmp = 0.0 if (t <= -1.26e+78) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (t <= -3.2e-89) tmp = t_1; elseif (t <= -1.25e-122) tmp = Float64(Float64(b * c) + Float64(Float64(18.0 * y) * Float64(t * Float64(x * z)))); elseif (t <= 1.32e+23) tmp = t_1; else tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
tmp = 0.0;
if (t <= -1.26e+78)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (t <= -3.2e-89)
tmp = t_1;
elseif (t <= -1.25e-122)
tmp = (b * c) + ((18.0 * y) * (t * (x * z)));
elseif (t <= 1.32e+23)
tmp = t_1;
else
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.26e+78], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.2e-89], t$95$1, If[LessEqual[t, -1.25e-122], N[(N[(b * c), $MachinePrecision] + N[(N[(18.0 * y), $MachinePrecision] * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.32e+23], t$95$1, N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{if}\;t \leq -1.26 \cdot 10^{+78}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{-122}:\\
\;\;\;\;b \cdot c + \left(18 \cdot y\right) \cdot \left(t \cdot \left(x \cdot z\right)\right)\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\end{array}
\end{array}
if t < -1.25999999999999992e78Initial program 76.8%
sub-neg76.8%
associate-+l-76.8%
sub-neg76.8%
sub-neg76.8%
distribute-rgt-out--78.8%
associate-*l*78.8%
distribute-lft-neg-in78.8%
cancel-sign-sub78.8%
associate-*l*78.8%
associate-*l*78.8%
Simplified78.8%
Taylor expanded in t around inf 74.1%
pow174.1%
*-commutative74.1%
Applied egg-rr74.1%
unpow174.1%
*-commutative74.1%
associate-*l*74.1%
*-commutative74.1%
Simplified74.1%
if -1.25999999999999992e78 < t < -3.19999999999999998e-89 or -1.25e-122 < t < 1.3199999999999999e23Initial program 90.2%
sub-neg90.2%
associate-+l-90.2%
sub-neg90.2%
sub-neg90.2%
distribute-rgt-out--90.2%
associate-*l*90.2%
distribute-lft-neg-in90.2%
cancel-sign-sub90.2%
associate-*l*90.2%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in t around 0 78.2%
if -3.19999999999999998e-89 < t < -1.25e-122Initial program 79.0%
sub-neg79.0%
associate-+l-79.0%
sub-neg79.0%
sub-neg79.0%
distribute-rgt-out--79.0%
associate-*l*79.0%
distribute-lft-neg-in79.0%
cancel-sign-sub79.0%
associate-*l*79.0%
associate-*l*79.0%
Simplified79.0%
Taylor expanded in j around 0 79.0%
Taylor expanded in i around 0 78.5%
Taylor expanded in y around inf 77.8%
associate-*r*77.7%
Simplified77.7%
if 1.3199999999999999e23 < t Initial program 83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
sub-neg83.6%
distribute-rgt-out--86.3%
associate-*l*81.2%
distribute-lft-neg-in81.2%
cancel-sign-sub81.2%
associate-*l*81.2%
associate-*l*81.2%
Simplified81.2%
Taylor expanded in t around inf 72.9%
Final simplification75.8%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))))
(if (<= x -5.1e+51)
t_1
(if (<= x 1.3e+19)
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(if (<= x 1.3e+136)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x 7.5e+160)
(- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
t_1))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double tmp;
if (x <= -5.1e+51) {
tmp = t_1;
} else if (x <= 1.3e+19) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if (x <= 1.3e+136) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 7.5e+160) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
if (x <= (-5.1d+51)) then
tmp = t_1
else if (x <= 1.3d+19) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else if (x <= 1.3d+136) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= 7.5d+160) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = t_1
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double tmp;
if (x <= -5.1e+51) {
tmp = t_1;
} else if (x <= 1.3e+19) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if (x <= 1.3e+136) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 7.5e+160) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t_1;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i)) tmp = 0 if x <= -5.1e+51: tmp = t_1 elif x <= 1.3e+19: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) elif x <= 1.3e+136: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= 7.5e+160: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = t_1 return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -5.1e+51) tmp = t_1; elseif (x <= 1.3e+19) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); elseif (x <= 1.3e+136) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= 7.5e+160) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = t_1; end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
tmp = 0.0;
if (x <= -5.1e+51)
tmp = t_1;
elseif (x <= 1.3e+19)
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
elseif (x <= 1.3e+136)
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
elseif (x <= 7.5e+160)
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.1e+51], t$95$1, If[LessEqual[x, 1.3e+19], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+136], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.5e+160], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -5.1 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+19}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+136}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+160}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -5.1000000000000001e51 or 7.50000000000000028e160 < x Initial program 72.9%
sub-neg72.9%
associate-+l-72.9%
sub-neg72.9%
sub-neg72.9%
distribute-rgt-out--74.2%
associate-*l*76.8%
distribute-lft-neg-in76.8%
cancel-sign-sub76.8%
associate-*l*76.8%
associate-*l*76.8%
Simplified76.8%
Taylor expanded in x around inf 79.6%
if -5.1000000000000001e51 < x < 1.3e19Initial program 91.2%
Taylor expanded in x around 0 74.7%
if 1.3e19 < x < 1.3000000000000001e136Initial program 90.3%
sub-neg90.3%
associate-+l-90.3%
sub-neg90.3%
sub-neg90.3%
distribute-rgt-out--90.3%
associate-*l*90.3%
distribute-lft-neg-in90.3%
cancel-sign-sub90.3%
associate-*l*90.3%
associate-*l*85.6%
Simplified85.6%
Taylor expanded in t around inf 72.7%
pow172.7%
*-commutative72.7%
Applied egg-rr72.7%
unpow172.7%
*-commutative72.7%
associate-*l*81.7%
*-commutative81.7%
Simplified81.7%
if 1.3000000000000001e136 < x < 7.50000000000000028e160Initial program 81.7%
sub-neg81.7%
associate-+l-81.7%
sub-neg81.7%
sub-neg81.7%
distribute-rgt-out--90.8%
associate-*l*90.8%
distribute-lft-neg-in90.8%
cancel-sign-sub90.8%
associate-*l*90.8%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in t around 0 73.8%
Final simplification76.7%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= y -1.8e+238)
(* (* (* (* x 18.0) y) z) t)
(if (<= y -9e+223)
t_1
(if (<= y -5.1e+126)
(* 18.0 (* y (* t (* x z))))
(if (<= y -2.7e-205)
t_1
(if (<= y -4e-307)
(* j (* k -27.0))
(if (<= y 4e-62) t_1 (* x (* 18.0 (* y (* z t))))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (y <= -1.8e+238) {
tmp = (((x * 18.0) * y) * z) * t;
} else if (y <= -9e+223) {
tmp = t_1;
} else if (y <= -5.1e+126) {
tmp = 18.0 * (y * (t * (x * z)));
} else if (y <= -2.7e-205) {
tmp = t_1;
} else if (y <= -4e-307) {
tmp = j * (k * -27.0);
} else if (y <= 4e-62) {
tmp = t_1;
} else {
tmp = x * (18.0 * (y * (z * t)));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
if (y <= (-1.8d+238)) then
tmp = (((x * 18.0d0) * y) * z) * t
else if (y <= (-9d+223)) then
tmp = t_1
else if (y <= (-5.1d+126)) then
tmp = 18.0d0 * (y * (t * (x * z)))
else if (y <= (-2.7d-205)) then
tmp = t_1
else if (y <= (-4d-307)) then
tmp = j * (k * (-27.0d0))
else if (y <= 4d-62) then
tmp = t_1
else
tmp = x * (18.0d0 * (y * (z * t)))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (y <= -1.8e+238) {
tmp = (((x * 18.0) * y) * z) * t;
} else if (y <= -9e+223) {
tmp = t_1;
} else if (y <= -5.1e+126) {
tmp = 18.0 * (y * (t * (x * z)));
} else if (y <= -2.7e-205) {
tmp = t_1;
} else if (y <= -4e-307) {
tmp = j * (k * -27.0);
} else if (y <= 4e-62) {
tmp = t_1;
} else {
tmp = x * (18.0 * (y * (z * t)));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) tmp = 0 if y <= -1.8e+238: tmp = (((x * 18.0) * y) * z) * t elif y <= -9e+223: tmp = t_1 elif y <= -5.1e+126: tmp = 18.0 * (y * (t * (x * z))) elif y <= -2.7e-205: tmp = t_1 elif y <= -4e-307: tmp = j * (k * -27.0) elif y <= 4e-62: tmp = t_1 else: tmp = x * (18.0 * (y * (z * t))) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (y <= -1.8e+238) tmp = Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t); elseif (y <= -9e+223) tmp = t_1; elseif (y <= -5.1e+126) tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))); elseif (y <= -2.7e-205) tmp = t_1; elseif (y <= -4e-307) tmp = Float64(j * Float64(k * -27.0)); elseif (y <= 4e-62) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (y <= -1.8e+238)
tmp = (((x * 18.0) * y) * z) * t;
elseif (y <= -9e+223)
tmp = t_1;
elseif (y <= -5.1e+126)
tmp = 18.0 * (y * (t * (x * z)));
elseif (y <= -2.7e-205)
tmp = t_1;
elseif (y <= -4e-307)
tmp = j * (k * -27.0);
elseif (y <= 4e-62)
tmp = t_1;
else
tmp = x * (18.0 * (y * (z * t)));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+238], N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, -9e+223], t$95$1, If[LessEqual[y, -5.1e+126], N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.7e-205], t$95$1, If[LessEqual[y, -4e-307], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4e-62], t$95$1, N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+238}:\\
\;\;\;\;\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.1 \cdot 10^{+126}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-205}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-307}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if y < -1.79999999999999986e238Initial program 80.5%
sub-neg80.5%
associate-+l-80.5%
sub-neg80.5%
sub-neg80.5%
distribute-rgt-out--80.5%
associate-*l*80.5%
distribute-lft-neg-in80.5%
cancel-sign-sub80.5%
associate-*l*80.5%
associate-*l*80.5%
Simplified80.5%
Taylor expanded in t around inf 52.1%
pow152.1%
*-commutative52.1%
Applied egg-rr52.1%
unpow152.1%
*-commutative52.1%
associate-*l*52.1%
*-commutative52.1%
Simplified52.1%
Taylor expanded in x around inf 61.0%
*-commutative61.0%
*-commutative61.0%
associate-*l*51.7%
*-commutative51.7%
associate-*r*51.7%
*-commutative51.7%
associate-*r*51.7%
*-commutative51.7%
associate-*r*51.7%
*-commutative51.7%
associate-*l*61.4%
Simplified61.4%
if -1.79999999999999986e238 < y < -9e223 or -5.1000000000000001e126 < y < -2.7000000000000001e-205 or -3.99999999999999964e-307 < y < 4.0000000000000002e-62Initial program 91.3%
sub-neg91.3%
associate-+l-91.3%
sub-neg91.3%
sub-neg91.3%
distribute-rgt-out--92.1%
associate-*l*91.4%
distribute-lft-neg-in91.4%
cancel-sign-sub91.4%
associate-*l*91.4%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in j around 0 70.9%
Taylor expanded in x around 0 51.3%
if -9e223 < y < -5.1000000000000001e126Initial program 67.3%
sub-neg67.3%
associate-+l-67.3%
sub-neg67.3%
sub-neg67.3%
distribute-rgt-out--71.4%
associate-*l*71.3%
distribute-lft-neg-in71.3%
cancel-sign-sub71.3%
associate-*l*71.3%
associate-*l*71.3%
Simplified71.3%
Taylor expanded in t around inf 59.4%
Taylor expanded in y around inf 59.2%
if -2.7000000000000001e-205 < y < -3.99999999999999964e-307Initial program 99.7%
sub-neg99.7%
+-commutative99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
*-commutative99.7%
distribute-rgt-neg-in99.7%
metadata-eval99.7%
sub-neg99.7%
+-commutative99.7%
associate-*l*99.7%
distribute-rgt-neg-in99.7%
Simplified93.6%
Taylor expanded in j around inf 47.5%
associate-*r*47.5%
*-commutative47.5%
*-commutative47.5%
*-commutative47.5%
Simplified47.5%
if 4.0000000000000002e-62 < y Initial program 78.8%
sub-neg78.8%
associate-+l-78.8%
sub-neg78.8%
sub-neg78.8%
distribute-rgt-out--80.0%
associate-*l*77.7%
distribute-lft-neg-in77.7%
cancel-sign-sub77.7%
associate-*l*77.7%
associate-*l*77.7%
Simplified77.7%
Taylor expanded in x around inf 50.5%
Taylor expanded in y around inf 42.5%
Final simplification49.5%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= y -1.75e+238)
(* (* (* (* x 18.0) y) z) t)
(if (<= y -9e+223)
t_1
(if (<= y -6e+80)
(* x (* t (* y (* 18.0 z))))
(if (<= y -1.22e-307)
(+ (* b c) (* k (* j -27.0)))
(if (<= y 4.2e-62) t_1 (* x (* 18.0 (* y (* z t)))))))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (y <= -1.75e+238) {
tmp = (((x * 18.0) * y) * z) * t;
} else if (y <= -9e+223) {
tmp = t_1;
} else if (y <= -6e+80) {
tmp = x * (t * (y * (18.0 * z)));
} else if (y <= -1.22e-307) {
tmp = (b * c) + (k * (j * -27.0));
} else if (y <= 4.2e-62) {
tmp = t_1;
} else {
tmp = x * (18.0 * (y * (z * t)));
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
if (y <= (-1.75d+238)) then
tmp = (((x * 18.0d0) * y) * z) * t
else if (y <= (-9d+223)) then
tmp = t_1
else if (y <= (-6d+80)) then
tmp = x * (t * (y * (18.0d0 * z)))
else if (y <= (-1.22d-307)) then
tmp = (b * c) + (k * (j * (-27.0d0)))
else if (y <= 4.2d-62) then
tmp = t_1
else
tmp = x * (18.0d0 * (y * (z * t)))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (y <= -1.75e+238) {
tmp = (((x * 18.0) * y) * z) * t;
} else if (y <= -9e+223) {
tmp = t_1;
} else if (y <= -6e+80) {
tmp = x * (t * (y * (18.0 * z)));
} else if (y <= -1.22e-307) {
tmp = (b * c) + (k * (j * -27.0));
} else if (y <= 4.2e-62) {
tmp = t_1;
} else {
tmp = x * (18.0 * (y * (z * t)));
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) tmp = 0 if y <= -1.75e+238: tmp = (((x * 18.0) * y) * z) * t elif y <= -9e+223: tmp = t_1 elif y <= -6e+80: tmp = x * (t * (y * (18.0 * z))) elif y <= -1.22e-307: tmp = (b * c) + (k * (j * -27.0)) elif y <= 4.2e-62: tmp = t_1 else: tmp = x * (18.0 * (y * (z * t))) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (y <= -1.75e+238) tmp = Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t); elseif (y <= -9e+223) tmp = t_1; elseif (y <= -6e+80) tmp = Float64(x * Float64(t * Float64(y * Float64(18.0 * z)))); elseif (y <= -1.22e-307) tmp = Float64(Float64(b * c) + Float64(k * Float64(j * -27.0))); elseif (y <= 4.2e-62) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (y <= -1.75e+238)
tmp = (((x * 18.0) * y) * z) * t;
elseif (y <= -9e+223)
tmp = t_1;
elseif (y <= -6e+80)
tmp = x * (t * (y * (18.0 * z)));
elseif (y <= -1.22e-307)
tmp = (b * c) + (k * (j * -27.0));
elseif (y <= 4.2e-62)
tmp = t_1;
else
tmp = x * (18.0 * (y * (z * t)));
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.75e+238], N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, -9e+223], t$95$1, If[LessEqual[y, -6e+80], N[(x * N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.22e-307], N[(N[(b * c), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.2e-62], t$95$1, N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;y \leq -1.75 \cdot 10^{+238}:\\
\;\;\;\;\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t\\
\mathbf{elif}\;y \leq -9 \cdot 10^{+223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6 \cdot 10^{+80}:\\
\;\;\;\;x \cdot \left(t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{elif}\;y \leq -1.22 \cdot 10^{-307}:\\
\;\;\;\;b \cdot c + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;y \leq 4.2 \cdot 10^{-62}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if y < -1.75000000000000001e238Initial program 80.5%
sub-neg80.5%
associate-+l-80.5%
sub-neg80.5%
sub-neg80.5%
distribute-rgt-out--80.5%
associate-*l*80.5%
distribute-lft-neg-in80.5%
cancel-sign-sub80.5%
associate-*l*80.5%
associate-*l*80.5%
Simplified80.5%
Taylor expanded in t around inf 52.1%
pow152.1%
*-commutative52.1%
Applied egg-rr52.1%
unpow152.1%
*-commutative52.1%
associate-*l*52.1%
*-commutative52.1%
Simplified52.1%
Taylor expanded in x around inf 61.0%
*-commutative61.0%
*-commutative61.0%
associate-*l*51.7%
*-commutative51.7%
associate-*r*51.7%
*-commutative51.7%
associate-*r*51.7%
*-commutative51.7%
associate-*r*51.7%
*-commutative51.7%
associate-*l*61.4%
Simplified61.4%
if -1.75000000000000001e238 < y < -9e223 or -1.22e-307 < y < 4.1999999999999998e-62Initial program 91.1%
sub-neg91.1%
associate-+l-91.1%
sub-neg91.1%
sub-neg91.1%
distribute-rgt-out--91.1%
associate-*l*91.2%
distribute-lft-neg-in91.2%
cancel-sign-sub91.2%
associate-*l*91.2%
associate-*l*91.1%
Simplified91.1%
Taylor expanded in j around 0 64.2%
Taylor expanded in x around 0 45.7%
if -9e223 < y < -5.99999999999999974e80Initial program 68.2%
sub-neg68.2%
associate-+l-68.2%
sub-neg68.2%
sub-neg68.2%
distribute-rgt-out--71.4%
associate-*l*68.3%
distribute-lft-neg-in68.3%
cancel-sign-sub68.3%
associate-*l*68.3%
associate-*l*68.3%
Simplified68.3%
Taylor expanded in x around inf 71.9%
Taylor expanded in y around inf 56.0%
associate-*r*56.1%
*-commutative56.1%
associate-*r*56.1%
associate-*r*56.0%
*-commutative56.0%
associate-*r*56.1%
Simplified56.1%
if -5.99999999999999974e80 < y < -1.22e-307Initial program 95.4%
sub-neg95.4%
*-commutative95.4%
distribute-rgt-neg-in95.4%
Simplified97.0%
fma-udef95.5%
fma-udef95.5%
associate-*l*95.5%
fma-udef95.5%
Applied egg-rr95.5%
Taylor expanded in b around inf 51.4%
if 4.1999999999999998e-62 < y Initial program 78.8%
sub-neg78.8%
associate-+l-78.8%
sub-neg78.8%
sub-neg78.8%
distribute-rgt-out--80.0%
associate-*l*77.7%
distribute-lft-neg-in77.7%
cancel-sign-sub77.7%
associate-*l*77.7%
associate-*l*77.7%
Simplified77.7%
Taylor expanded in x around inf 50.5%
Taylor expanded in y around inf 42.5%
Final simplification48.1%
NOTE: j and k should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -1650000.0)
(* -27.0 (* j k))
(if (<= k 9e-271)
(* b c)
(if (<= k 2.7e+69) (* t (* a -4.0)) (* k (* j -27.0))))))assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1650000.0) {
tmp = -27.0 * (j * k);
} else if (k <= 9e-271) {
tmp = b * c;
} else if (k <= 2.7e+69) {
tmp = t * (a * -4.0);
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-1650000.0d0)) then
tmp = (-27.0d0) * (j * k)
else if (k <= 9d-271) then
tmp = b * c
else if (k <= 2.7d+69) then
tmp = t * (a * (-4.0d0))
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1650000.0) {
tmp = -27.0 * (j * k);
} else if (k <= 9e-271) {
tmp = b * c;
} else if (k <= 2.7e+69) {
tmp = t * (a * -4.0);
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -1650000.0: tmp = -27.0 * (j * k) elif k <= 9e-271: tmp = b * c elif k <= 2.7e+69: tmp = t * (a * -4.0) else: tmp = k * (j * -27.0) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -1650000.0) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= 9e-271) tmp = Float64(b * c); elseif (k <= 2.7e+69) tmp = Float64(t * Float64(a * -4.0)); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -1650000.0)
tmp = -27.0 * (j * k);
elseif (k <= 9e-271)
tmp = b * c;
elseif (k <= 2.7e+69)
tmp = t * (a * -4.0);
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1650000.0], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9e-271], N[(b * c), $MachinePrecision], If[LessEqual[k, 2.7e+69], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1650000:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq 9 \cdot 10^{-271}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;k \leq 2.7 \cdot 10^{+69}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < -1.65e6Initial program 84.1%
sub-neg84.1%
+-commutative84.1%
associate-*l*84.2%
distribute-rgt-neg-in84.2%
fma-def90.0%
*-commutative90.0%
distribute-rgt-neg-in90.0%
metadata-eval90.0%
sub-neg90.0%
+-commutative90.0%
associate-*l*90.0%
distribute-rgt-neg-in90.0%
Simplified92.7%
Taylor expanded in j around inf 36.8%
if -1.65e6 < k < 8.9999999999999995e-271Initial program 89.9%
sub-neg89.9%
associate-+l-89.9%
sub-neg89.9%
sub-neg89.9%
distribute-rgt-out--89.9%
associate-*l*91.4%
distribute-lft-neg-in91.4%
cancel-sign-sub91.4%
associate-*l*91.4%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in j around 0 85.4%
Taylor expanded in c around inf 33.7%
if 8.9999999999999995e-271 < k < 2.6999999999999998e69Initial program 83.4%
sub-neg83.4%
associate-+l-83.4%
sub-neg83.4%
sub-neg83.4%
distribute-rgt-out--83.4%
associate-*l*76.2%
distribute-lft-neg-in76.2%
cancel-sign-sub76.2%
associate-*l*76.2%
associate-*l*76.2%
Simplified76.2%
Taylor expanded in t around inf 53.0%
Taylor expanded in y around 0 32.3%
if 2.6999999999999998e69 < k Initial program 82.7%
sub-neg82.7%
+-commutative82.7%
associate-*l*80.8%
distribute-rgt-neg-in80.8%
fma-def84.6%
*-commutative84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
sub-neg84.6%
+-commutative84.6%
associate-*l*84.6%
distribute-rgt-neg-in84.6%
Simplified90.5%
Taylor expanded in j around inf 50.5%
associate-*r*50.6%
*-commutative50.6%
*-commutative50.6%
*-commutative50.6%
Simplified50.6%
Taylor expanded in j around 0 50.5%
*-commutative50.5%
associate-*r*50.7%
Simplified50.7%
Final simplification37.6%
NOTE: j and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= k -4.6e+17) (not (<= k 1.1e+19))) (* -27.0 (* j k)) (* b c)))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -4.6e+17) || !(k <= 1.1e+19)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-4.6d+17)) .or. (.not. (k <= 1.1d+19))) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -4.6e+17) || !(k <= 1.1e+19)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -4.6e+17) or not (k <= 1.1e+19): tmp = -27.0 * (j * k) else: tmp = b * c return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -4.6e+17) || !(k <= 1.1e+19)) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((k <= -4.6e+17) || ~((k <= 1.1e+19)))
tmp = -27.0 * (j * k);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -4.6e+17], N[Not[LessEqual[k, 1.1e+19]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -4.6 \cdot 10^{+17} \lor \neg \left(k \leq 1.1 \cdot 10^{+19}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -4.6e17 or 1.1e19 < k Initial program 84.1%
sub-neg84.1%
+-commutative84.1%
associate-*l*83.3%
distribute-rgt-neg-in83.3%
fma-def88.1%
*-commutative88.1%
distribute-rgt-neg-in88.1%
metadata-eval88.1%
sub-neg88.1%
+-commutative88.1%
associate-*l*88.1%
distribute-rgt-neg-in88.1%
Simplified89.7%
Taylor expanded in j around inf 42.1%
if -4.6e17 < k < 1.1e19Initial program 86.3%
sub-neg86.3%
associate-+l-86.3%
sub-neg86.3%
sub-neg86.3%
distribute-rgt-out--87.1%
associate-*l*85.7%
distribute-lft-neg-in85.7%
cancel-sign-sub85.7%
associate-*l*85.7%
associate-*l*86.5%
Simplified86.5%
Taylor expanded in j around 0 81.4%
Taylor expanded in c around inf 29.7%
Final simplification35.8%
NOTE: j and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= k -41000000.0) (* -27.0 (* j k)) (if (<= k 2.1e+19) (* b c) (* j (* k -27.0)))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -41000000.0) {
tmp = -27.0 * (j * k);
} else if (k <= 2.1e+19) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-41000000.0d0)) then
tmp = (-27.0d0) * (j * k)
else if (k <= 2.1d+19) then
tmp = b * c
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -41000000.0) {
tmp = -27.0 * (j * k);
} else if (k <= 2.1e+19) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -41000000.0: tmp = -27.0 * (j * k) elif k <= 2.1e+19: tmp = b * c else: tmp = j * (k * -27.0) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -41000000.0) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= 2.1e+19) tmp = Float64(b * c); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -41000000.0)
tmp = -27.0 * (j * k);
elseif (k <= 2.1e+19)
tmp = b * c;
else
tmp = j * (k * -27.0);
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -41000000.0], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.1e+19], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -41000000:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq 2.1 \cdot 10^{+19}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -4.1e7Initial program 83.9%
sub-neg83.9%
+-commutative83.9%
associate-*l*83.9%
distribute-rgt-neg-in83.9%
fma-def89.8%
*-commutative89.8%
distribute-rgt-neg-in89.8%
metadata-eval89.8%
sub-neg89.8%
+-commutative89.8%
associate-*l*89.8%
distribute-rgt-neg-in89.8%
Simplified92.6%
Taylor expanded in j around inf 37.3%
if -4.1e7 < k < 2.1e19Initial program 87.0%
sub-neg87.0%
associate-+l-87.0%
sub-neg87.0%
sub-neg87.0%
distribute-rgt-out--87.0%
associate-*l*85.6%
distribute-lft-neg-in85.6%
cancel-sign-sub85.6%
associate-*l*85.6%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in j around 0 81.2%
Taylor expanded in c around inf 29.9%
if 2.1e19 < k Initial program 82.8%
sub-neg82.8%
+-commutative82.8%
associate-*l*81.0%
distribute-rgt-neg-in81.0%
fma-def84.5%
*-commutative84.5%
distribute-rgt-neg-in84.5%
metadata-eval84.5%
sub-neg84.5%
+-commutative84.5%
associate-*l*84.5%
distribute-rgt-neg-in84.5%
Simplified86.4%
Taylor expanded in j around inf 47.1%
associate-*r*47.2%
*-commutative47.2%
*-commutative47.2%
*-commutative47.2%
Simplified47.2%
Final simplification35.8%
NOTE: j and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= k -6800000000.0) (* -27.0 (* j k)) (if (<= k 4.7e+19) (* b c) (* k (* j -27.0)))))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -6800000000.0) {
tmp = -27.0 * (j * k);
} else if (k <= 4.7e+19) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-6800000000.0d0)) then
tmp = (-27.0d0) * (j * k)
else if (k <= 4.7d+19) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -6800000000.0) {
tmp = -27.0 * (j * k);
} else if (k <= 4.7e+19) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -6800000000.0: tmp = -27.0 * (j * k) elif k <= 4.7e+19: tmp = b * c else: tmp = k * (j * -27.0) return tmp
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -6800000000.0) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= 4.7e+19) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -6800000000.0)
tmp = -27.0 * (j * k);
elseif (k <= 4.7e+19)
tmp = b * c;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -6800000000.0], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.7e+19], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -6800000000:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq 4.7 \cdot 10^{+19}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < -6.8e9Initial program 83.9%
sub-neg83.9%
+-commutative83.9%
associate-*l*83.9%
distribute-rgt-neg-in83.9%
fma-def89.8%
*-commutative89.8%
distribute-rgt-neg-in89.8%
metadata-eval89.8%
sub-neg89.8%
+-commutative89.8%
associate-*l*89.8%
distribute-rgt-neg-in89.8%
Simplified92.6%
Taylor expanded in j around inf 37.3%
if -6.8e9 < k < 4.7e19Initial program 87.0%
sub-neg87.0%
associate-+l-87.0%
sub-neg87.0%
sub-neg87.0%
distribute-rgt-out--87.0%
associate-*l*85.6%
distribute-lft-neg-in85.6%
cancel-sign-sub85.6%
associate-*l*85.6%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in j around 0 81.2%
Taylor expanded in c around inf 29.9%
if 4.7e19 < k Initial program 82.8%
sub-neg82.8%
+-commutative82.8%
associate-*l*81.0%
distribute-rgt-neg-in81.0%
fma-def84.5%
*-commutative84.5%
distribute-rgt-neg-in84.5%
metadata-eval84.5%
sub-neg84.5%
+-commutative84.5%
associate-*l*84.5%
distribute-rgt-neg-in84.5%
Simplified86.4%
Taylor expanded in j around inf 47.1%
associate-*r*47.2%
*-commutative47.2%
*-commutative47.2%
*-commutative47.2%
Simplified47.2%
Taylor expanded in j around 0 47.1%
*-commutative47.1%
associate-*r*47.3%
Simplified47.3%
Final simplification35.8%
NOTE: j and k should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* b c))
assert(j < k);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
NOTE: j and k should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
assert j < k;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
[j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
j, k = num2cell(sort([j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: j and k should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[j, k] = \mathsf{sort}([j, k])\\
\\
b \cdot c
\end{array}
Initial program 85.2%
sub-neg85.2%
associate-+l-85.2%
sub-neg85.2%
sub-neg85.2%
distribute-rgt-out--86.4%
associate-*l*84.9%
distribute-lft-neg-in84.9%
cancel-sign-sub84.9%
associate-*l*84.9%
associate-*l*84.9%
Simplified84.9%
Taylor expanded in j around 0 68.6%
Taylor expanded in c around inf 20.4%
Final simplification20.4%
(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 2023173
(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)))