
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: y and z should be sorted in increasing order before calling this function.
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 (* t (- (* 18.0 (* y (* x z))) (* a 4.0))))))assert(y < z);
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 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
assert y < z;
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 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
}
return tmp;
}
[y, z] = sort([y, z]) [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 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) return tmp
y, z = sort([y, z]) 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(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); end return tmp end
y, z = num2cell(sort([y, z])){:}
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 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[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}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\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 96.6%
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--19.4%
associate-*l*19.4%
distribute-lft-neg-in19.4%
cancel-sign-sub19.4%
associate-*l*19.4%
associate-*l*19.4%
Simplified19.4%
Taylor expanded in t around inf 64.9%
Final simplification92.8%
NOTE: y and z should be sorted in increasing order before calling this function.
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 (<= t -2.4e+70) (not (<= t 1.45e+86)))
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(+
(* b c)
(+ (* (* j k) -27.0) (* x (+ (* 18.0 (* y (* z t))) (* i -4.0)))))))assert(y < z);
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 ((t <= -2.4e+70) || !(t <= 1.45e+86)) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = (b * c) + (((j * k) * -27.0) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((t <= (-2.4d+70)) .or. (.not. (t <= 1.45d+86))) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else
tmp = (b * c) + (((j * k) * (-27.0d0)) + (x * ((18.0d0 * (y * (z * t))) + (i * (-4.0d0)))))
end if
code = tmp
end function
assert y < z;
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 ((t <= -2.4e+70) || !(t <= 1.45e+86)) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = (b * c) + (((j * k) * -27.0) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))));
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -2.4e+70) or not (t <= 1.45e+86): tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) else: tmp = (b * c) + (((j * k) * -27.0) + (x * ((18.0 * (y * (z * t))) + (i * -4.0)))) return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -2.4e+70) || !(t <= 1.45e+86)) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(b * c) + Float64(Float64(Float64(j * k) * -27.0) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) + Float64(i * -4.0))))); end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -2.4e+70) || ~((t <= 1.45e+86)))
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
else
tmp = (b * c) + (((j * k) * -27.0) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. 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[t, -2.4e+70], N[Not[LessEqual[t, 1.45e+86]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+70} \lor \neg \left(t \leq 1.45 \cdot 10^{+86}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + \left(\left(j \cdot k\right) \cdot -27 + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\right)\\
\end{array}
\end{array}
if t < -2.39999999999999987e70 or 1.44999999999999995e86 < t Initial program 80.0%
sub-neg80.0%
associate-+l-80.0%
sub-neg80.0%
sub-neg80.0%
distribute-rgt-out--86.3%
associate-*l*85.2%
distribute-lft-neg-in85.2%
cancel-sign-sub85.2%
associate-*l*85.2%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in t around inf 82.0%
if -2.39999999999999987e70 < t < 1.44999999999999995e86Initial program 87.8%
Simplified92.6%
Taylor expanded in a around 0 88.5%
Final simplification86.1%
NOTE: y and z should be sorted in increasing order before calling this function.
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 (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -4.2e+68)
(- (+ t_1 (* b c)) (* 27.0 (* j k)))
(if (<= t 1.95e+86)
(+
(* b c)
(+ (* (* j k) -27.0) (* x (+ (* 18.0 (* y (* z t))) (* i -4.0)))))
t_1))))assert(y < z);
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 * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -4.2e+68) {
tmp = (t_1 + (b * c)) - (27.0 * (j * k));
} else if (t <= 1.95e+86) {
tmp = (b * c) + (((j * k) * -27.0) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-4.2d+68)) then
tmp = (t_1 + (b * c)) - (27.0d0 * (j * k))
else if (t <= 1.95d+86) then
tmp = (b * c) + (((j * k) * (-27.0d0)) + (x * ((18.0d0 * (y * (z * t))) + (i * (-4.0d0)))))
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
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 * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -4.2e+68) {
tmp = (t_1 + (b * c)) - (27.0 * (j * k));
} else if (t <= 1.95e+86) {
tmp = (b * c) + (((j * k) * -27.0) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))));
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -4.2e+68: tmp = (t_1 + (b * c)) - (27.0 * (j * k)) elif t <= 1.95e+86: tmp = (b * c) + (((j * k) * -27.0) + (x * ((18.0 * (y * (z * t))) + (i * -4.0)))) else: tmp = t_1 return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -4.2e+68) tmp = Float64(Float64(t_1 + Float64(b * c)) - Float64(27.0 * Float64(j * k))); elseif (t <= 1.95e+86) tmp = Float64(Float64(b * c) + Float64(Float64(Float64(j * k) * -27.0) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) + Float64(i * -4.0))))); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -4.2e+68)
tmp = (t_1 + (b * c)) - (27.0 * (j * k));
elseif (t <= 1.95e+86)
tmp = (b * c) + (((j * k) * -27.0) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+68], N[(N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+86], N[(N[(b * c), $MachinePrecision] + N[(N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+68}:\\
\;\;\;\;\left(t_1 + b \cdot c\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+86}:\\
\;\;\;\;b \cdot c + \left(\left(j \cdot k\right) \cdot -27 + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) + i \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.20000000000000002e68Initial program 83.6%
sub-neg83.6%
associate-+l-83.6%
sub-neg83.6%
sub-neg83.6%
distribute-rgt-out--90.1%
associate-*l*88.4%
distribute-lft-neg-in88.4%
cancel-sign-sub88.4%
associate-*l*88.4%
associate-*l*88.4%
Simplified88.4%
Taylor expanded in i around 0 90.9%
if -4.20000000000000002e68 < t < 1.9500000000000001e86Initial program 87.8%
Simplified92.6%
Taylor expanded in a around 0 88.5%
if 1.9500000000000001e86 < t Initial program 73.5%
sub-neg73.5%
associate-+l-73.5%
sub-neg73.5%
sub-neg73.5%
distribute-rgt-out--79.4%
associate-*l*79.4%
distribute-lft-neg-in79.4%
cancel-sign-sub79.4%
associate-*l*79.4%
associate-*l*79.4%
Simplified79.4%
Taylor expanded in t around inf 88.7%
Final simplification89.1%
NOTE: y and z should be sorted in increasing order before calling this function.
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 k) -27.0) (* -4.0 (* x i))))
(t_2 (* 27.0 (* j k)))
(t_3 (- (* -4.0 (* t a)) t_2))
(t_4 (- (* b c) t_2)))
(if (<= t -2.7e+180)
(* 18.0 (* y (* z (* x t))))
(if (<= t -2.05e+68)
t_3
(if (<= t 1.35e-283)
t_1
(if (<= t 2.2e-72)
t_4
(if (<= t 3.1e+54)
t_1
(if (<= t 4.2e+85)
t_4
(if (<= t 1.75e+150) t_3 (* 18.0 (* y (* t (* x z)))))))))))))assert(y < z);
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 * k) * -27.0) + (-4.0 * (x * i));
double t_2 = 27.0 * (j * k);
double t_3 = (-4.0 * (t * a)) - t_2;
double t_4 = (b * c) - t_2;
double tmp;
if (t <= -2.7e+180) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (t <= -2.05e+68) {
tmp = t_3;
} else if (t <= 1.35e-283) {
tmp = t_1;
} else if (t <= 2.2e-72) {
tmp = t_4;
} else if (t <= 3.1e+54) {
tmp = t_1;
} else if (t <= 4.2e+85) {
tmp = t_4;
} else if (t <= 1.75e+150) {
tmp = t_3;
} else {
tmp = 18.0 * (y * (t * (x * z)));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) :: t_4
real(8) :: tmp
t_1 = ((j * k) * (-27.0d0)) + ((-4.0d0) * (x * i))
t_2 = 27.0d0 * (j * k)
t_3 = ((-4.0d0) * (t * a)) - t_2
t_4 = (b * c) - t_2
if (t <= (-2.7d+180)) then
tmp = 18.0d0 * (y * (z * (x * t)))
else if (t <= (-2.05d+68)) then
tmp = t_3
else if (t <= 1.35d-283) then
tmp = t_1
else if (t <= 2.2d-72) then
tmp = t_4
else if (t <= 3.1d+54) then
tmp = t_1
else if (t <= 4.2d+85) then
tmp = t_4
else if (t <= 1.75d+150) then
tmp = t_3
else
tmp = 18.0d0 * (y * (t * (x * z)))
end if
code = tmp
end function
assert y < z;
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 * k) * -27.0) + (-4.0 * (x * i));
double t_2 = 27.0 * (j * k);
double t_3 = (-4.0 * (t * a)) - t_2;
double t_4 = (b * c) - t_2;
double tmp;
if (t <= -2.7e+180) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (t <= -2.05e+68) {
tmp = t_3;
} else if (t <= 1.35e-283) {
tmp = t_1;
} else if (t <= 2.2e-72) {
tmp = t_4;
} else if (t <= 3.1e+54) {
tmp = t_1;
} else if (t <= 4.2e+85) {
tmp = t_4;
} else if (t <= 1.75e+150) {
tmp = t_3;
} else {
tmp = 18.0 * (y * (t * (x * z)));
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((j * k) * -27.0) + (-4.0 * (x * i)) t_2 = 27.0 * (j * k) t_3 = (-4.0 * (t * a)) - t_2 t_4 = (b * c) - t_2 tmp = 0 if t <= -2.7e+180: tmp = 18.0 * (y * (z * (x * t))) elif t <= -2.05e+68: tmp = t_3 elif t <= 1.35e-283: tmp = t_1 elif t <= 2.2e-72: tmp = t_4 elif t <= 3.1e+54: tmp = t_1 elif t <= 4.2e+85: tmp = t_4 elif t <= 1.75e+150: tmp = t_3 else: tmp = 18.0 * (y * (t * (x * z))) return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(j * k) * -27.0) + Float64(-4.0 * Float64(x * i))) t_2 = Float64(27.0 * Float64(j * k)) t_3 = Float64(Float64(-4.0 * Float64(t * a)) - t_2) t_4 = Float64(Float64(b * c) - t_2) tmp = 0.0 if (t <= -2.7e+180) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); elseif (t <= -2.05e+68) tmp = t_3; elseif (t <= 1.35e-283) tmp = t_1; elseif (t <= 2.2e-72) tmp = t_4; elseif (t <= 3.1e+54) tmp = t_1; elseif (t <= 4.2e+85) tmp = t_4; elseif (t <= 1.75e+150) tmp = t_3; else tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = ((j * k) * -27.0) + (-4.0 * (x * i));
t_2 = 27.0 * (j * k);
t_3 = (-4.0 * (t * a)) - t_2;
t_4 = (b * c) - t_2;
tmp = 0.0;
if (t <= -2.7e+180)
tmp = 18.0 * (y * (z * (x * t)));
elseif (t <= -2.05e+68)
tmp = t_3;
elseif (t <= 1.35e-283)
tmp = t_1;
elseif (t <= 2.2e-72)
tmp = t_4;
elseif (t <= 3.1e+54)
tmp = t_1;
elseif (t <= 4.2e+85)
tmp = t_4;
elseif (t <= 1.75e+150)
tmp = t_3;
else
tmp = 18.0 * (y * (t * (x * z)));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision]}, If[LessEqual[t, -2.7e+180], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.05e+68], t$95$3, If[LessEqual[t, 1.35e-283], t$95$1, If[LessEqual[t, 2.2e-72], t$95$4, If[LessEqual[t, 3.1e+54], t$95$1, If[LessEqual[t, 4.2e+85], t$95$4, If[LessEqual[t, 1.75e+150], t$95$3, N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := \left(j \cdot k\right) \cdot -27 + -4 \cdot \left(x \cdot i\right)\\
t_2 := 27 \cdot \left(j \cdot k\right)\\
t_3 := -4 \cdot \left(t \cdot a\right) - t_2\\
t_4 := b \cdot c - t_2\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+180}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;t \leq -2.05 \cdot 10^{+68}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-283}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-72}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+85}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{+150}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -2.70000000000000016e180Initial program 79.3%
sub-neg79.3%
associate-+l-79.3%
sub-neg79.3%
sub-neg79.3%
distribute-rgt-out--89.6%
associate-*l*86.1%
distribute-lft-neg-in86.1%
cancel-sign-sub86.1%
associate-*l*86.1%
associate-*l*86.1%
Simplified86.1%
Taylor expanded in i around 0 93.0%
Taylor expanded in a around 0 66.0%
Taylor expanded in y around inf 63.1%
*-commutative63.1%
*-commutative63.1%
*-commutative63.1%
associate-*l*69.7%
Simplified69.7%
if -2.70000000000000016e180 < t < -2.05e68 or 4.2000000000000002e85 < t < 1.74999999999999992e150Initial program 88.1%
sub-neg88.1%
associate-+l-88.1%
sub-neg88.1%
sub-neg88.1%
distribute-rgt-out--90.4%
associate-*l*90.4%
distribute-lft-neg-in90.4%
cancel-sign-sub90.4%
associate-*l*90.4%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in x around 0 69.3%
Taylor expanded in c around 0 65.8%
if -2.05e68 < t < 1.35e-283 or 2.20000000000000002e-72 < t < 3.0999999999999999e54Initial program 87.9%
sub-neg87.9%
+-commutative87.9%
associate-*l*88.0%
distribute-rgt-neg-in88.0%
fma-def88.0%
*-commutative88.0%
distribute-rgt-neg-in88.0%
metadata-eval88.0%
sub-neg88.0%
+-commutative88.0%
associate-*l*88.0%
distribute-rgt-neg-in88.0%
Simplified89.8%
Taylor expanded in x around inf 67.2%
*-commutative67.2%
associate-*r*65.4%
associate-*l*64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in z around 0 59.5%
if 1.35e-283 < t < 2.20000000000000002e-72 or 3.0999999999999999e54 < t < 4.2000000000000002e85Initial program 87.5%
sub-neg87.5%
associate-+l-87.5%
sub-neg87.5%
sub-neg87.5%
distribute-rgt-out--87.5%
associate-*l*84.1%
distribute-lft-neg-in84.1%
cancel-sign-sub84.1%
associate-*l*84.1%
associate-*l*84.2%
Simplified84.2%
Taylor expanded in x around 0 69.7%
Taylor expanded in a around 0 68.0%
if 1.74999999999999992e150 < t Initial program 66.7%
sub-neg66.7%
associate-+l-66.7%
sub-neg66.7%
sub-neg66.7%
distribute-rgt-out--75.0%
associate-*l*75.0%
distribute-lft-neg-in75.0%
cancel-sign-sub75.0%
associate-*l*75.0%
associate-*l*75.0%
Simplified75.0%
Taylor expanded in x around inf 68.1%
Taylor expanded in y around inf 68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in y around 0 71.9%
Final simplification64.7%
NOTE: y and z should be sorted in increasing order before calling this function.
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) (* 27.0 (* j k))))
(t_2 (+ (* (* j k) -27.0) (* -4.0 (* x i))))
(t_3 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -1.2e+67)
t_3
(if (<= t 2.7e-283)
t_2
(if (<= t 2.4e-72)
t_1
(if (<= t 6.9e+55) t_2 (if (<= t 4.9e+85) t_1 t_3)))))))assert(y < z);
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) - (27.0 * (j * k));
double t_2 = ((j * k) * -27.0) + (-4.0 * (x * i));
double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -1.2e+67) {
tmp = t_3;
} else if (t <= 2.7e-283) {
tmp = t_2;
} else if (t <= 2.4e-72) {
tmp = t_1;
} else if (t <= 6.9e+55) {
tmp = t_2;
} else if (t <= 4.9e+85) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) - (27.0d0 * (j * k))
t_2 = ((j * k) * (-27.0d0)) + ((-4.0d0) * (x * i))
t_3 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-1.2d+67)) then
tmp = t_3
else if (t <= 2.7d-283) then
tmp = t_2
else if (t <= 2.4d-72) then
tmp = t_1
else if (t <= 6.9d+55) then
tmp = t_2
else if (t <= 4.9d+85) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
assert y < z;
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) - (27.0 * (j * k));
double t_2 = ((j * k) * -27.0) + (-4.0 * (x * i));
double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -1.2e+67) {
tmp = t_3;
} else if (t <= 2.7e-283) {
tmp = t_2;
} else if (t <= 2.4e-72) {
tmp = t_1;
} else if (t <= 6.9e+55) {
tmp = t_2;
} else if (t <= 4.9e+85) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) t_2 = ((j * k) * -27.0) + (-4.0 * (x * i)) t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -1.2e+67: tmp = t_3 elif t <= 2.7e-283: tmp = t_2 elif t <= 2.4e-72: tmp = t_1 elif t <= 6.9e+55: tmp = t_2 elif t <= 4.9e+85: tmp = t_1 else: tmp = t_3 return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(Float64(Float64(j * k) * -27.0) + Float64(-4.0 * Float64(x * i))) t_3 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.2e+67) tmp = t_3; elseif (t <= 2.7e-283) tmp = t_2; elseif (t <= 2.4e-72) tmp = t_1; elseif (t <= 6.9e+55) tmp = t_2; elseif (t <= 4.9e+85) tmp = t_1; else tmp = t_3; end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
t_2 = ((j * k) * -27.0) + (-4.0 * (x * i));
t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -1.2e+67)
tmp = t_3;
elseif (t <= 2.7e-283)
tmp = t_2;
elseif (t <= 2.4e-72)
tmp = t_1;
elseif (t <= 6.9e+55)
tmp = t_2;
elseif (t <= 4.9e+85)
tmp = t_1;
else
tmp = t_3;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e+67], t$95$3, If[LessEqual[t, 2.7e-283], t$95$2, If[LessEqual[t, 2.4e-72], t$95$1, If[LessEqual[t, 6.9e+55], t$95$2, If[LessEqual[t, 4.9e+85], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := \left(j \cdot k\right) \cdot -27 + -4 \cdot \left(x \cdot i\right)\\
t_3 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{+67}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-283}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.9 \cdot 10^{+55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -1.20000000000000001e67 or 4.8999999999999997e85 < t Initial program 80.0%
sub-neg80.0%
associate-+l-80.0%
sub-neg80.0%
sub-neg80.0%
distribute-rgt-out--86.3%
associate-*l*85.2%
distribute-lft-neg-in85.2%
cancel-sign-sub85.2%
associate-*l*85.2%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in t around inf 82.0%
if -1.20000000000000001e67 < t < 2.7e-283 or 2.4e-72 < t < 6.9000000000000004e55Initial program 87.9%
sub-neg87.9%
+-commutative87.9%
associate-*l*88.0%
distribute-rgt-neg-in88.0%
fma-def88.0%
*-commutative88.0%
distribute-rgt-neg-in88.0%
metadata-eval88.0%
sub-neg88.0%
+-commutative88.0%
associate-*l*88.0%
distribute-rgt-neg-in88.0%
Simplified89.8%
Taylor expanded in x around inf 67.2%
*-commutative67.2%
associate-*r*65.4%
associate-*l*64.5%
*-commutative64.5%
Simplified64.5%
Taylor expanded in z around 0 59.5%
if 2.7e-283 < t < 2.4e-72 or 6.9000000000000004e55 < t < 4.8999999999999997e85Initial program 87.5%
sub-neg87.5%
associate-+l-87.5%
sub-neg87.5%
sub-neg87.5%
distribute-rgt-out--87.5%
associate-*l*84.1%
distribute-lft-neg-in84.1%
cancel-sign-sub84.1%
associate-*l*84.1%
associate-*l*84.2%
Simplified84.2%
Taylor expanded in x around 0 69.7%
Taylor expanded in a around 0 68.0%
Final simplification69.7%
NOTE: y and z should be sorted in increasing order before calling this function.
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 (* 18.0 (* y (* t (* x z))))))
(if (<= z -5.6e-56)
t_1
(if (<= z 3.7e-262)
(* (* j k) -27.0)
(if (<= z 4.7e-172)
(* x (* i -4.0))
(if (<= z 3.7e-154)
(* k (* j -27.0))
(if (<= z 1.75e+54) (* -4.0 (* t a)) t_1)))))))assert(y < z);
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 = 18.0 * (y * (t * (x * z)));
double tmp;
if (z <= -5.6e-56) {
tmp = t_1;
} else if (z <= 3.7e-262) {
tmp = (j * k) * -27.0;
} else if (z <= 4.7e-172) {
tmp = x * (i * -4.0);
} else if (z <= 3.7e-154) {
tmp = k * (j * -27.0);
} else if (z <= 1.75e+54) {
tmp = -4.0 * (t * a);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = 18.0d0 * (y * (t * (x * z)))
if (z <= (-5.6d-56)) then
tmp = t_1
else if (z <= 3.7d-262) then
tmp = (j * k) * (-27.0d0)
else if (z <= 4.7d-172) then
tmp = x * (i * (-4.0d0))
else if (z <= 3.7d-154) then
tmp = k * (j * (-27.0d0))
else if (z <= 1.75d+54) then
tmp = (-4.0d0) * (t * a)
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
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 = 18.0 * (y * (t * (x * z)));
double tmp;
if (z <= -5.6e-56) {
tmp = t_1;
} else if (z <= 3.7e-262) {
tmp = (j * k) * -27.0;
} else if (z <= 4.7e-172) {
tmp = x * (i * -4.0);
} else if (z <= 3.7e-154) {
tmp = k * (j * -27.0);
} else if (z <= 1.75e+54) {
tmp = -4.0 * (t * a);
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (y * (t * (x * z))) tmp = 0 if z <= -5.6e-56: tmp = t_1 elif z <= 3.7e-262: tmp = (j * k) * -27.0 elif z <= 4.7e-172: tmp = x * (i * -4.0) elif z <= 3.7e-154: tmp = k * (j * -27.0) elif z <= 1.75e+54: tmp = -4.0 * (t * a) else: tmp = t_1 return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) tmp = 0.0 if (z <= -5.6e-56) tmp = t_1; elseif (z <= 3.7e-262) tmp = Float64(Float64(j * k) * -27.0); elseif (z <= 4.7e-172) tmp = Float64(x * Float64(i * -4.0)); elseif (z <= 3.7e-154) tmp = Float64(k * Float64(j * -27.0)); elseif (z <= 1.75e+54) tmp = Float64(-4.0 * Float64(t * a)); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (y * (t * (x * z)));
tmp = 0.0;
if (z <= -5.6e-56)
tmp = t_1;
elseif (z <= 3.7e-262)
tmp = (j * k) * -27.0;
elseif (z <= 4.7e-172)
tmp = x * (i * -4.0);
elseif (z <= 3.7e-154)
tmp = k * (j * -27.0);
elseif (z <= 1.75e+54)
tmp = -4.0 * (t * a);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e-56], t$95$1, If[LessEqual[z, 3.7e-262], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[z, 4.7e-172], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-154], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+54], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-262}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-172}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-154}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+54}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -5.59999999999999986e-56 or 1.7500000000000001e54 < z Initial program 80.6%
sub-neg80.6%
associate-+l-80.6%
sub-neg80.6%
sub-neg80.6%
distribute-rgt-out--84.4%
associate-*l*80.7%
distribute-lft-neg-in80.7%
cancel-sign-sub80.7%
associate-*l*80.7%
associate-*l*80.8%
Simplified80.8%
Taylor expanded in x around inf 52.4%
Taylor expanded in y around inf 40.7%
*-commutative40.7%
Simplified40.7%
Taylor expanded in y around 0 45.1%
if -5.59999999999999986e-56 < z < 3.7e-262Initial program 90.4%
sub-neg90.4%
+-commutative90.4%
associate-*l*90.5%
distribute-rgt-neg-in90.5%
fma-def90.5%
*-commutative90.5%
distribute-rgt-neg-in90.5%
metadata-eval90.5%
sub-neg90.5%
+-commutative90.5%
associate-*l*90.5%
distribute-rgt-neg-in90.5%
Simplified95.2%
Taylor expanded in j around inf 35.7%
if 3.7e-262 < z < 4.69999999999999976e-172Initial program 95.6%
sub-neg95.6%
associate-+l-95.6%
sub-neg95.6%
sub-neg95.6%
distribute-rgt-out--95.6%
associate-*l*95.6%
distribute-lft-neg-in95.6%
cancel-sign-sub95.6%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 31.0%
Taylor expanded in y around 0 31.0%
if 4.69999999999999976e-172 < z < 3.69999999999999987e-154Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-def100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in j around inf 50.1%
*-commutative50.1%
associate-*r*50.9%
*-commutative50.9%
Simplified50.9%
if 3.69999999999999987e-154 < z < 1.7500000000000001e54Initial program 83.2%
sub-neg83.2%
associate-+l-83.2%
sub-neg83.2%
sub-neg83.2%
distribute-rgt-out--86.1%
associate-*l*88.7%
distribute-lft-neg-in88.7%
cancel-sign-sub88.7%
associate-*l*88.7%
associate-*l*88.7%
Simplified88.7%
associate--l+88.7%
associate-*r*86.1%
associate-*r*88.7%
associate-*l*88.7%
fma-def88.7%
*-commutative88.7%
associate-*r*88.7%
Applied egg-rr88.7%
Taylor expanded in x around 0 81.9%
associate-*r*81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in a around inf 27.4%
Final simplification39.1%
NOTE: y and z should be sorted in increasing order before calling this function.
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 (<= z -3.9e-53)
(* 18.0 (* y (* z (* x t))))
(if (<= z 1.8e-261)
(* (* j k) -27.0)
(if (<= z 1.35e-171)
(* x (* i -4.0))
(if (<= z 5.3e-154)
(* k (* j -27.0))
(if (<= z 2.05e+54)
(* -4.0 (* t a))
(* 18.0 (* y (* t (* x z))))))))))assert(y < z);
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 (z <= -3.9e-53) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (z <= 1.8e-261) {
tmp = (j * k) * -27.0;
} else if (z <= 1.35e-171) {
tmp = x * (i * -4.0);
} else if (z <= 5.3e-154) {
tmp = k * (j * -27.0);
} else if (z <= 2.05e+54) {
tmp = -4.0 * (t * a);
} else {
tmp = 18.0 * (y * (t * (x * z)));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 (z <= (-3.9d-53)) then
tmp = 18.0d0 * (y * (z * (x * t)))
else if (z <= 1.8d-261) then
tmp = (j * k) * (-27.0d0)
else if (z <= 1.35d-171) then
tmp = x * (i * (-4.0d0))
else if (z <= 5.3d-154) then
tmp = k * (j * (-27.0d0))
else if (z <= 2.05d+54) then
tmp = (-4.0d0) * (t * a)
else
tmp = 18.0d0 * (y * (t * (x * z)))
end if
code = tmp
end function
assert y < z;
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 (z <= -3.9e-53) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (z <= 1.8e-261) {
tmp = (j * k) * -27.0;
} else if (z <= 1.35e-171) {
tmp = x * (i * -4.0);
} else if (z <= 5.3e-154) {
tmp = k * (j * -27.0);
} else if (z <= 2.05e+54) {
tmp = -4.0 * (t * a);
} else {
tmp = 18.0 * (y * (t * (x * z)));
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= -3.9e-53: tmp = 18.0 * (y * (z * (x * t))) elif z <= 1.8e-261: tmp = (j * k) * -27.0 elif z <= 1.35e-171: tmp = x * (i * -4.0) elif z <= 5.3e-154: tmp = k * (j * -27.0) elif z <= 2.05e+54: tmp = -4.0 * (t * a) else: tmp = 18.0 * (y * (t * (x * z))) return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= -3.9e-53) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); elseif (z <= 1.8e-261) tmp = Float64(Float64(j * k) * -27.0); elseif (z <= 1.35e-171) tmp = Float64(x * Float64(i * -4.0)); elseif (z <= 5.3e-154) tmp = Float64(k * Float64(j * -27.0)); elseif (z <= 2.05e+54) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (z <= -3.9e-53)
tmp = 18.0 * (y * (z * (x * t)));
elseif (z <= 1.8e-261)
tmp = (j * k) * -27.0;
elseif (z <= 1.35e-171)
tmp = x * (i * -4.0);
elseif (z <= 5.3e-154)
tmp = k * (j * -27.0);
elseif (z <= 2.05e+54)
tmp = -4.0 * (t * a);
else
tmp = 18.0 * (y * (t * (x * z)));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. 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[z, -3.9e-53], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-261], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[z, 1.35e-171], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e-154], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+54], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.9 \cdot 10^{-53}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-261}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-171}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-154}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+54}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -3.9000000000000002e-53Initial program 82.3%
sub-neg82.3%
associate-+l-82.3%
sub-neg82.3%
sub-neg82.3%
distribute-rgt-out--83.4%
associate-*l*79.3%
distribute-lft-neg-in79.3%
cancel-sign-sub79.3%
associate-*l*79.3%
associate-*l*79.4%
Simplified79.4%
Taylor expanded in i around 0 77.5%
Taylor expanded in a around 0 67.7%
Taylor expanded in y around inf 38.5%
*-commutative38.5%
*-commutative38.5%
*-commutative38.5%
associate-*l*37.5%
Simplified37.5%
if -3.9000000000000002e-53 < z < 1.79999999999999999e-261Initial program 90.4%
sub-neg90.4%
+-commutative90.4%
associate-*l*90.5%
distribute-rgt-neg-in90.5%
fma-def90.5%
*-commutative90.5%
distribute-rgt-neg-in90.5%
metadata-eval90.5%
sub-neg90.5%
+-commutative90.5%
associate-*l*90.5%
distribute-rgt-neg-in90.5%
Simplified95.2%
Taylor expanded in j around inf 35.7%
if 1.79999999999999999e-261 < z < 1.35000000000000007e-171Initial program 95.6%
sub-neg95.6%
associate-+l-95.6%
sub-neg95.6%
sub-neg95.6%
distribute-rgt-out--95.6%
associate-*l*95.6%
distribute-lft-neg-in95.6%
cancel-sign-sub95.6%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in x around inf 31.0%
Taylor expanded in y around 0 31.0%
if 1.35000000000000007e-171 < z < 5.3000000000000002e-154Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
fma-def100.0%
*-commutative100.0%
distribute-rgt-neg-in100.0%
metadata-eval100.0%
sub-neg100.0%
+-commutative100.0%
associate-*l*100.0%
distribute-rgt-neg-in100.0%
Simplified100.0%
Taylor expanded in j around inf 50.1%
*-commutative50.1%
associate-*r*50.9%
*-commutative50.9%
Simplified50.9%
if 5.3000000000000002e-154 < z < 2.04999999999999984e54Initial program 83.2%
sub-neg83.2%
associate-+l-83.2%
sub-neg83.2%
sub-neg83.2%
distribute-rgt-out--86.1%
associate-*l*88.7%
distribute-lft-neg-in88.7%
cancel-sign-sub88.7%
associate-*l*88.7%
associate-*l*88.7%
Simplified88.7%
associate--l+88.7%
associate-*r*86.1%
associate-*r*88.7%
associate-*l*88.7%
fma-def88.7%
*-commutative88.7%
associate-*r*88.7%
Applied egg-rr88.7%
Taylor expanded in x around 0 81.9%
associate-*r*81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in a around inf 27.4%
if 2.04999999999999984e54 < z Initial program 76.4%
sub-neg76.4%
associate-+l-76.4%
sub-neg76.4%
sub-neg76.4%
distribute-rgt-out--87.0%
associate-*l*84.3%
distribute-lft-neg-in84.3%
cancel-sign-sub84.3%
associate-*l*84.3%
associate-*l*84.3%
Simplified84.3%
Taylor expanded in x around inf 69.4%
Taylor expanded in y around inf 59.0%
*-commutative59.0%
Simplified59.0%
Taylor expanded in y around 0 61.5%
Final simplification38.7%
NOTE: y and z should be sorted in increasing order before calling this function.
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) (* 27.0 (* j k)))))
(if (<= t -6.2e+157)
(* 18.0 (* y (* z (* x t))))
(if (<= t 2.8e-72)
t_1
(if (<= t 5.6e+57)
(+ (* (* j k) -27.0) (* -4.0 (* x i)))
(if (<= t 9.5e+87)
t_1
(if (<= t 4.6e+150)
(* -4.0 (* t a))
(* 18.0 (* y (* t (* x z)))))))))))assert(y < z);
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) - (27.0 * (j * k));
double tmp;
if (t <= -6.2e+157) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (t <= 2.8e-72) {
tmp = t_1;
} else if (t <= 5.6e+57) {
tmp = ((j * k) * -27.0) + (-4.0 * (x * i));
} else if (t <= 9.5e+87) {
tmp = t_1;
} else if (t <= 4.6e+150) {
tmp = -4.0 * (t * a);
} else {
tmp = 18.0 * (y * (t * (x * z)));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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) - (27.0d0 * (j * k))
if (t <= (-6.2d+157)) then
tmp = 18.0d0 * (y * (z * (x * t)))
else if (t <= 2.8d-72) then
tmp = t_1
else if (t <= 5.6d+57) then
tmp = ((j * k) * (-27.0d0)) + ((-4.0d0) * (x * i))
else if (t <= 9.5d+87) then
tmp = t_1
else if (t <= 4.6d+150) then
tmp = (-4.0d0) * (t * a)
else
tmp = 18.0d0 * (y * (t * (x * z)))
end if
code = tmp
end function
assert y < z;
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) - (27.0 * (j * k));
double tmp;
if (t <= -6.2e+157) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (t <= 2.8e-72) {
tmp = t_1;
} else if (t <= 5.6e+57) {
tmp = ((j * k) * -27.0) + (-4.0 * (x * i));
} else if (t <= 9.5e+87) {
tmp = t_1;
} else if (t <= 4.6e+150) {
tmp = -4.0 * (t * a);
} else {
tmp = 18.0 * (y * (t * (x * z)));
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) tmp = 0 if t <= -6.2e+157: tmp = 18.0 * (y * (z * (x * t))) elif t <= 2.8e-72: tmp = t_1 elif t <= 5.6e+57: tmp = ((j * k) * -27.0) + (-4.0 * (x * i)) elif t <= 9.5e+87: tmp = t_1 elif t <= 4.6e+150: tmp = -4.0 * (t * a) else: tmp = 18.0 * (y * (t * (x * z))) return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (t <= -6.2e+157) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); elseif (t <= 2.8e-72) tmp = t_1; elseif (t <= 5.6e+57) tmp = Float64(Float64(Float64(j * k) * -27.0) + Float64(-4.0 * Float64(x * i))); elseif (t <= 9.5e+87) tmp = t_1; elseif (t <= 4.6e+150) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - (27.0 * (j * k));
tmp = 0.0;
if (t <= -6.2e+157)
tmp = 18.0 * (y * (z * (x * t)));
elseif (t <= 2.8e-72)
tmp = t_1;
elseif (t <= 5.6e+57)
tmp = ((j * k) * -27.0) + (-4.0 * (x * i));
elseif (t <= 9.5e+87)
tmp = t_1;
elseif (t <= 4.6e+150)
tmp = -4.0 * (t * a);
else
tmp = 18.0 * (y * (t * (x * z)));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+157], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e-72], t$95$1, If[LessEqual[t, 5.6e+57], N[(N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.5e+87], t$95$1, If[LessEqual[t, 4.6e+150], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+157}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-72}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{+57}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+150}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -6.1999999999999994e157Initial program 82.8%
sub-neg82.8%
associate-+l-82.8%
sub-neg82.8%
sub-neg82.8%
distribute-rgt-out--91.4%
associate-*l*88.5%
distribute-lft-neg-in88.5%
cancel-sign-sub88.5%
associate-*l*88.5%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in i around 0 91.5%
Taylor expanded in a around 0 60.7%
Taylor expanded in y around inf 58.3%
*-commutative58.3%
*-commutative58.3%
*-commutative58.3%
associate-*l*66.6%
Simplified66.6%
if -6.1999999999999994e157 < t < 2.7999999999999998e-72 or 5.59999999999999999e57 < t < 9.4999999999999992e87Initial program 87.3%
sub-neg87.3%
associate-+l-87.3%
sub-neg87.3%
sub-neg87.3%
distribute-rgt-out--87.9%
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 x around 0 64.7%
Taylor expanded in a around 0 55.2%
if 2.7999999999999998e-72 < t < 5.59999999999999999e57Initial program 87.9%
sub-neg87.9%
+-commutative87.9%
associate-*l*87.9%
distribute-rgt-neg-in87.9%
fma-def87.9%
*-commutative87.9%
distribute-rgt-neg-in87.9%
metadata-eval87.9%
sub-neg87.9%
+-commutative87.9%
associate-*l*87.9%
distribute-rgt-neg-in87.9%
Simplified91.9%
Taylor expanded in x around inf 76.2%
*-commutative76.2%
associate-*r*76.2%
associate-*l*76.2%
*-commutative76.2%
Simplified76.2%
Taylor expanded in z around 0 63.2%
if 9.4999999999999992e87 < t < 4.60000000000000002e150Initial program 90.0%
sub-neg90.0%
associate-+l-90.0%
sub-neg90.0%
sub-neg90.0%
distribute-rgt-out--90.0%
associate-*l*90.0%
distribute-lft-neg-in90.0%
cancel-sign-sub90.0%
associate-*l*90.0%
associate-*l*90.0%
Simplified90.0%
associate--l+90.0%
associate-*r*90.0%
associate-*r*90.0%
associate-*l*90.0%
fma-def90.0%
*-commutative90.0%
associate-*r*90.0%
Applied egg-rr90.0%
Taylor expanded in x around 0 80.5%
associate-*r*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in a around inf 70.5%
if 4.60000000000000002e150 < t Initial program 66.7%
sub-neg66.7%
associate-+l-66.7%
sub-neg66.7%
sub-neg66.7%
distribute-rgt-out--75.0%
associate-*l*75.0%
distribute-lft-neg-in75.0%
cancel-sign-sub75.0%
associate-*l*75.0%
associate-*l*75.0%
Simplified75.0%
Taylor expanded in x around inf 68.1%
Taylor expanded in y around inf 68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in y around 0 71.9%
Final simplification59.7%
NOTE: y and z should be sorted in increasing order before calling this function. 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 (<= x -4.9e+73) (not (<= x 6.6e+66))) (* x (- (* 18.0 (* y (* z t))) (* 4.0 i))) (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))))
assert(y < z);
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 <= -4.9e+73) || !(x <= 6.6e+66)) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 <= (-4.9d+73)) .or. (.not. (x <= 6.6d+66))) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
end if
code = tmp
end function
assert y < z;
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 <= -4.9e+73) || !(x <= 6.6e+66)) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -4.9e+73) or not (x <= 6.6e+66): tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) else: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -4.9e+73) || !(x <= 6.6e+66)) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); end return tmp end
y, z = num2cell(sort([y, z])){:}
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 <= -4.9e+73) || ~((x <= 6.6e+66)))
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
else
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. 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[x, -4.9e+73], N[Not[LessEqual[x, 6.6e+66]], $MachinePrecision]], 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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+73} \lor \neg \left(x \leq 6.6 \cdot 10^{+66}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -4.8999999999999999e73 or 6.6000000000000003e66 < x Initial program 76.2%
sub-neg76.2%
associate-+l-76.2%
sub-neg76.2%
sub-neg76.2%
distribute-rgt-out--78.2%
associate-*l*81.1%
distribute-lft-neg-in81.1%
cancel-sign-sub81.1%
associate-*l*81.1%
associate-*l*81.1%
Simplified81.1%
Taylor expanded in x around inf 71.3%
if -4.8999999999999999e73 < x < 6.6000000000000003e66Initial program 90.4%
sub-neg90.4%
associate-+l-90.4%
sub-neg90.4%
sub-neg90.4%
distribute-rgt-out--92.9%
associate-*l*89.8%
distribute-lft-neg-in89.8%
cancel-sign-sub89.8%
associate-*l*89.8%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in x around 0 73.9%
Final simplification72.9%
NOTE: y and z should be sorted in increasing order before calling this function. 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 (<= t -4.6e+67) (not (<= t 2.2e+85))) (* t (- (* 18.0 (* y (* x z))) (* a 4.0))) (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))))
assert(y < z);
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 ((t <= -4.6e+67) || !(t <= 2.2e+85)) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 ((t <= (-4.6d+67)) .or. (.not. (t <= 2.2d+85))) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
assert y < z;
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 ((t <= -4.6e+67) || !(t <= 2.2e+85)) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -4.6e+67) or not (t <= 2.2e+85): tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) else: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -4.6e+67) || !(t <= 2.2e+85)) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((t <= -4.6e+67) || ~((t <= 2.2e+85)))
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
else
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. 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[t, -4.6e+67], N[Not[LessEqual[t, 2.2e+85]], $MachinePrecision]], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+67} \lor \neg \left(t \leq 2.2 \cdot 10^{+85}\right):\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -4.5999999999999997e67 or 2.2000000000000002e85 < t Initial program 80.0%
sub-neg80.0%
associate-+l-80.0%
sub-neg80.0%
sub-neg80.0%
distribute-rgt-out--86.3%
associate-*l*85.2%
distribute-lft-neg-in85.2%
cancel-sign-sub85.2%
associate-*l*85.2%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in t around inf 82.0%
if -4.5999999999999997e67 < t < 2.2000000000000002e85Initial program 87.8%
Taylor expanded in t around 0 82.7%
Final simplification82.5%
NOTE: y and z should be sorted in increasing order before calling this function.
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 (* i -4.0))) (t_2 (* -4.0 (* t a))))
(if (<= t -1.65e+69)
t_2
(if (<= t 7.7e-283)
t_1
(if (<= t 2.05e-72)
(* b c)
(if (<= t 1.7e+59) t_1 (if (<= t 4.4e+86) (* b c) t_2)))))))assert(y < z);
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 * (i * -4.0);
double t_2 = -4.0 * (t * a);
double tmp;
if (t <= -1.65e+69) {
tmp = t_2;
} else if (t <= 7.7e-283) {
tmp = t_1;
} else if (t <= 2.05e-72) {
tmp = b * c;
} else if (t <= 1.7e+59) {
tmp = t_1;
} else if (t <= 4.4e+86) {
tmp = b * c;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 = x * (i * (-4.0d0))
t_2 = (-4.0d0) * (t * a)
if (t <= (-1.65d+69)) then
tmp = t_2
else if (t <= 7.7d-283) then
tmp = t_1
else if (t <= 2.05d-72) then
tmp = b * c
else if (t <= 1.7d+59) then
tmp = t_1
else if (t <= 4.4d+86) then
tmp = b * c
else
tmp = t_2
end if
code = tmp
end function
assert y < z;
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 * (i * -4.0);
double t_2 = -4.0 * (t * a);
double tmp;
if (t <= -1.65e+69) {
tmp = t_2;
} else if (t <= 7.7e-283) {
tmp = t_1;
} else if (t <= 2.05e-72) {
tmp = b * c;
} else if (t <= 1.7e+59) {
tmp = t_1;
} else if (t <= 4.4e+86) {
tmp = b * c;
} else {
tmp = t_2;
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) t_2 = -4.0 * (t * a) tmp = 0 if t <= -1.65e+69: tmp = t_2 elif t <= 7.7e-283: tmp = t_1 elif t <= 2.05e-72: tmp = b * c elif t <= 1.7e+59: tmp = t_1 elif t <= 4.4e+86: tmp = b * c else: tmp = t_2 return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) t_2 = Float64(-4.0 * Float64(t * a)) tmp = 0.0 if (t <= -1.65e+69) tmp = t_2; elseif (t <= 7.7e-283) tmp = t_1; elseif (t <= 2.05e-72) tmp = Float64(b * c); elseif (t <= 1.7e+59) tmp = t_1; elseif (t <= 4.4e+86) tmp = Float64(b * c); else tmp = t_2; end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * -4.0);
t_2 = -4.0 * (t * a);
tmp = 0.0;
if (t <= -1.65e+69)
tmp = t_2;
elseif (t <= 7.7e-283)
tmp = t_1;
elseif (t <= 2.05e-72)
tmp = b * c;
elseif (t <= 1.7e+59)
tmp = t_1;
elseif (t <= 4.4e+86)
tmp = b * c;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
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[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e+69], t$95$2, If[LessEqual[t, 7.7e-283], t$95$1, If[LessEqual[t, 2.05e-72], N[(b * c), $MachinePrecision], If[LessEqual[t, 1.7e+59], t$95$1, If[LessEqual[t, 4.4e+86], N[(b * c), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -1.65 \cdot 10^{+69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7.7 \cdot 10^{-283}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{-72}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+86}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.6499999999999999e69 or 4.40000000000000006e86 < t Initial program 80.0%
sub-neg80.0%
associate-+l-80.0%
sub-neg80.0%
sub-neg80.0%
distribute-rgt-out--86.3%
associate-*l*85.2%
distribute-lft-neg-in85.2%
cancel-sign-sub85.2%
associate-*l*85.2%
associate-*l*85.2%
Simplified85.2%
associate--l+85.2%
associate-*r*86.3%
associate-*r*85.2%
associate-*l*85.2%
fma-def86.2%
*-commutative86.2%
associate-*r*86.2%
Applied egg-rr86.2%
Taylor expanded in x around 0 55.2%
associate-*r*55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in a around inf 41.3%
if -1.6499999999999999e69 < t < 7.7000000000000003e-283 or 2.05000000000000002e-72 < t < 1.70000000000000003e59Initial program 88.1%
sub-neg88.1%
associate-+l-88.1%
sub-neg88.1%
sub-neg88.1%
distribute-rgt-out--88.1%
associate-*l*89.0%
distribute-lft-neg-in89.0%
cancel-sign-sub89.0%
associate-*l*89.0%
associate-*l*89.0%
Simplified89.0%
Taylor expanded in x around inf 44.0%
Taylor expanded in y around 0 34.9%
if 7.7000000000000003e-283 < t < 2.05000000000000002e-72 or 1.70000000000000003e59 < t < 4.40000000000000006e86Initial program 87.1%
sub-neg87.1%
associate-+l-87.1%
sub-neg87.1%
sub-neg87.1%
distribute-rgt-out--87.1%
associate-*l*83.5%
distribute-lft-neg-in83.5%
cancel-sign-sub83.5%
associate-*l*83.5%
associate-*l*83.6%
Simplified83.6%
associate--l+83.6%
associate-*r*87.1%
associate-*r*83.6%
associate-*l*83.6%
fma-def83.6%
*-commutative83.6%
associate-*r*83.5%
Applied egg-rr83.5%
Taylor expanded in b around inf 48.4%
Final simplification40.1%
NOTE: y and z should be sorted in increasing order before calling this function.
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 (<= t -5e+157)
(* 18.0 (* y (* z (* x t))))
(if (<= t 1.1e+88)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 3.25e+150) (* -4.0 (* t a)) (* 18.0 (* y (* t (* x z))))))))assert(y < z);
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 (t <= -5e+157) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (t <= 1.1e+88) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 3.25e+150) {
tmp = -4.0 * (t * a);
} else {
tmp = 18.0 * (y * (t * (x * z)));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 (t <= (-5d+157)) then
tmp = 18.0d0 * (y * (z * (x * t)))
else if (t <= 1.1d+88) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 3.25d+150) then
tmp = (-4.0d0) * (t * a)
else
tmp = 18.0d0 * (y * (t * (x * z)))
end if
code = tmp
end function
assert y < z;
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 (t <= -5e+157) {
tmp = 18.0 * (y * (z * (x * t)));
} else if (t <= 1.1e+88) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 3.25e+150) {
tmp = -4.0 * (t * a);
} else {
tmp = 18.0 * (y * (t * (x * z)));
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -5e+157: tmp = 18.0 * (y * (z * (x * t))) elif t <= 1.1e+88: tmp = (b * c) - (27.0 * (j * k)) elif t <= 3.25e+150: tmp = -4.0 * (t * a) else: tmp = 18.0 * (y * (t * (x * z))) return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -5e+157) tmp = Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))); elseif (t <= 1.1e+88) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 3.25e+150) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -5e+157)
tmp = 18.0 * (y * (z * (x * t)));
elseif (t <= 1.1e+88)
tmp = (b * c) - (27.0 * (j * k));
elseif (t <= 3.25e+150)
tmp = -4.0 * (t * a);
else
tmp = 18.0 * (y * (t * (x * z)));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. 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[t, -5e+157], N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+88], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.25e+150], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+157}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+88}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 3.25 \cdot 10^{+150}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < -4.99999999999999976e157Initial program 82.8%
sub-neg82.8%
associate-+l-82.8%
sub-neg82.8%
sub-neg82.8%
distribute-rgt-out--91.4%
associate-*l*88.5%
distribute-lft-neg-in88.5%
cancel-sign-sub88.5%
associate-*l*88.5%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in i around 0 91.5%
Taylor expanded in a around 0 60.7%
Taylor expanded in y around inf 58.3%
*-commutative58.3%
*-commutative58.3%
*-commutative58.3%
associate-*l*66.6%
Simplified66.6%
if -4.99999999999999976e157 < t < 1.10000000000000004e88Initial program 87.4%
sub-neg87.4%
associate-+l-87.4%
sub-neg87.4%
sub-neg87.4%
distribute-rgt-out--87.9%
associate-*l*87.4%
distribute-lft-neg-in87.4%
cancel-sign-sub87.4%
associate-*l*87.4%
associate-*l*87.4%
Simplified87.4%
Taylor expanded in x around 0 63.7%
Taylor expanded in a around 0 53.8%
if 1.10000000000000004e88 < t < 3.25000000000000016e150Initial program 90.0%
sub-neg90.0%
associate-+l-90.0%
sub-neg90.0%
sub-neg90.0%
distribute-rgt-out--90.0%
associate-*l*90.0%
distribute-lft-neg-in90.0%
cancel-sign-sub90.0%
associate-*l*90.0%
associate-*l*90.0%
Simplified90.0%
associate--l+90.0%
associate-*r*90.0%
associate-*r*90.0%
associate-*l*90.0%
fma-def90.0%
*-commutative90.0%
associate-*r*90.0%
Applied egg-rr90.0%
Taylor expanded in x around 0 80.5%
associate-*r*80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in a around inf 70.5%
if 3.25000000000000016e150 < t Initial program 66.7%
sub-neg66.7%
associate-+l-66.7%
sub-neg66.7%
sub-neg66.7%
distribute-rgt-out--75.0%
associate-*l*75.0%
distribute-lft-neg-in75.0%
cancel-sign-sub75.0%
associate-*l*75.0%
associate-*l*75.0%
Simplified75.0%
Taylor expanded in x around inf 68.1%
Taylor expanded in y around inf 68.1%
*-commutative68.1%
Simplified68.1%
Taylor expanded in y around 0 71.9%
Final simplification57.9%
NOTE: y and z should be sorted in increasing order before calling this function. 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 -3.2e-63) (not (<= k 4.65e+111))) (* (* j k) -27.0) (* b c)))
assert(y < z);
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 <= -3.2e-63) || !(k <= 4.65e+111)) {
tmp = (j * k) * -27.0;
} else {
tmp = b * c;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 <= (-3.2d-63)) .or. (.not. (k <= 4.65d+111))) then
tmp = (j * k) * (-27.0d0)
else
tmp = b * c
end if
code = tmp
end function
assert y < z;
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 <= -3.2e-63) || !(k <= 4.65e+111)) {
tmp = (j * k) * -27.0;
} else {
tmp = b * c;
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -3.2e-63) or not (k <= 4.65e+111): tmp = (j * k) * -27.0 else: tmp = b * c return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -3.2e-63) || !(k <= 4.65e+111)) tmp = Float64(Float64(j * k) * -27.0); else tmp = Float64(b * c); end return tmp end
y, z = num2cell(sort([y, z])){:}
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 <= -3.2e-63) || ~((k <= 4.65e+111)))
tmp = (j * k) * -27.0;
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. 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, -3.2e-63], N[Not[LessEqual[k, 4.65e+111]], $MachinePrecision]], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.2 \cdot 10^{-63} \lor \neg \left(k \leq 4.65 \cdot 10^{+111}\right):\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -3.19999999999999989e-63 or 4.65000000000000006e111 < k Initial program 79.0%
sub-neg79.0%
+-commutative79.0%
associate-*l*79.0%
distribute-rgt-neg-in79.0%
fma-def82.3%
*-commutative82.3%
distribute-rgt-neg-in82.3%
metadata-eval82.3%
sub-neg82.3%
+-commutative82.3%
associate-*l*82.3%
distribute-rgt-neg-in82.3%
Simplified90.4%
Taylor expanded in j around inf 37.8%
if -3.19999999999999989e-63 < k < 4.65000000000000006e111Initial program 90.4%
sub-neg90.4%
associate-+l-90.4%
sub-neg90.4%
sub-neg90.4%
distribute-rgt-out--92.6%
associate-*l*90.4%
distribute-lft-neg-in90.4%
cancel-sign-sub90.4%
associate-*l*90.4%
associate-*l*90.4%
Simplified90.4%
associate--l+90.4%
associate-*r*92.6%
associate-*r*90.4%
associate-*l*90.4%
fma-def90.4%
*-commutative90.4%
associate-*r*90.4%
Applied egg-rr90.4%
Taylor expanded in b around inf 32.0%
Final simplification34.8%
NOTE: y and z should be sorted in increasing order before calling this function. 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 -3.2e-63) (* (* j k) -27.0) (if (<= k 3.8e+110) (* b c) (* j (* k -27.0)))))
assert(y < z);
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 <= -3.2e-63) {
tmp = (j * k) * -27.0;
} else if (k <= 3.8e+110) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
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 <= (-3.2d-63)) then
tmp = (j * k) * (-27.0d0)
else if (k <= 3.8d+110) then
tmp = b * c
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
assert y < z;
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 <= -3.2e-63) {
tmp = (j * k) * -27.0;
} else if (k <= 3.8e+110) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -3.2e-63: tmp = (j * k) * -27.0 elif k <= 3.8e+110: tmp = b * c else: tmp = j * (k * -27.0) return tmp
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -3.2e-63) tmp = Float64(Float64(j * k) * -27.0); elseif (k <= 3.8e+110) tmp = Float64(b * c); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
y, z = num2cell(sort([y, z])){:}
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 <= -3.2e-63)
tmp = (j * k) * -27.0;
elseif (k <= 3.8e+110)
tmp = b * c;
else
tmp = j * (k * -27.0);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. 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, -3.2e-63], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[k, 3.8e+110], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -3.2 \cdot 10^{-63}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;k \leq 3.8 \cdot 10^{+110}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if k < -3.19999999999999989e-63Initial program 78.5%
sub-neg78.5%
+-commutative78.5%
associate-*l*78.5%
distribute-rgt-neg-in78.5%
fma-def79.8%
*-commutative79.8%
distribute-rgt-neg-in79.8%
metadata-eval79.8%
sub-neg79.8%
+-commutative79.8%
associate-*l*79.8%
distribute-rgt-neg-in79.8%
Simplified90.0%
Taylor expanded in j around inf 31.7%
if -3.19999999999999989e-63 < k < 3.79999999999999989e110Initial program 90.4%
sub-neg90.4%
associate-+l-90.4%
sub-neg90.4%
sub-neg90.4%
distribute-rgt-out--92.6%
associate-*l*90.4%
distribute-lft-neg-in90.4%
cancel-sign-sub90.4%
associate-*l*90.4%
associate-*l*90.4%
Simplified90.4%
associate--l+90.4%
associate-*r*92.6%
associate-*r*90.4%
associate-*l*90.4%
fma-def90.4%
*-commutative90.4%
associate-*r*90.4%
Applied egg-rr90.4%
Taylor expanded in b around inf 32.0%
if 3.79999999999999989e110 < k Initial program 79.9%
sub-neg79.9%
+-commutative79.9%
associate-*l*80.0%
distribute-rgt-neg-in80.0%
fma-def86.7%
*-commutative86.7%
distribute-rgt-neg-in86.7%
metadata-eval86.7%
sub-neg86.7%
+-commutative86.7%
associate-*l*86.7%
distribute-rgt-neg-in86.7%
Simplified91.1%
Taylor expanded in j around inf 48.3%
associate-*r*48.3%
*-commutative48.3%
*-commutative48.3%
*-commutative48.3%
Simplified48.3%
Final simplification34.8%
NOTE: y and z should be sorted in increasing order before calling this function. 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(y < z);
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: y and z should be sorted in increasing order before calling this function.
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 y < z;
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;
}
[y, z] = sort([y, z]) [j, k] = sort([j, k]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
y, z = sort([y, z]) j, k = sort([j, k]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
y, z = num2cell(sort([y, z])){:}
j, k = num2cell(sort([j, k])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: y and z should be sorted in increasing order before calling this function. 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}
[y, z] = \mathsf{sort}([y, z])\\
[j, k] = \mathsf{sort}([j, k])\\
\\
b \cdot c
\end{array}
Initial program 84.9%
sub-neg84.9%
associate-+l-84.9%
sub-neg84.9%
sub-neg84.9%
distribute-rgt-out--87.2%
associate-*l*86.5%
distribute-lft-neg-in86.5%
cancel-sign-sub86.5%
associate-*l*86.5%
associate-*l*86.5%
Simplified86.5%
associate--l+86.5%
associate-*r*87.3%
associate-*r*86.5%
associate-*l*86.5%
fma-def87.3%
*-commutative87.3%
associate-*r*87.2%
Applied egg-rr87.2%
Taylor expanded in b around inf 25.1%
Final simplification25.1%
(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 2023224
(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)))