
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
tmp = 0.0;
if (t_1 <= Inf)
tmp = t_1;
else
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.3%
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--14.3%
associate-*l*21.4%
distribute-lft-neg-in21.4%
cancel-sign-sub21.4%
associate-*l*21.4%
associate-*l*21.4%
Simplified21.4%
Taylor expanded in x around inf 72.2%
Final simplification92.8%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -1.1e+160)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (or (<= t -3.2e-55) (not (<= t 3.05e-139)))
(-
(+ (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) (* b c))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(+
(* b c)
(+ (* -27.0 (* j k)) (* x (+ (* 18.0 (* y (* z t))) (* i -4.0))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.1e+160) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if ((t <= -3.2e-55) || !(t <= 3.05e-139)) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (b * c) + ((-27.0 * (j * k)) + (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.
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 <= (-1.1d+160)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if ((t <= (-3.2d-55)) .or. (.not. (t <= 3.05d-139))) then
tmp = ((t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) + (b * c)) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (b * c) + (((-27.0d0) * (j * k)) + (x * ((18.0d0 * (y * (z * t))) + (i * (-4.0d0)))))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -1.1e+160) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if ((t <= -3.2e-55) || !(t <= 3.05e-139)) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (b * c) + ((-27.0 * (j * k)) + (x * ((18.0 * (y * (z * t))) + (i * -4.0))));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if t <= -1.1e+160: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif (t <= -3.2e-55) or not (t <= 3.05e-139): tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (b * c) + ((-27.0 * (j * k)) + (x * ((18.0 * (y * (z * t))) + (i * -4.0)))) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -1.1e+160) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif ((t <= -3.2e-55) || !(t <= 3.05e-139)) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(b * c) + Float64(Float64(-27.0 * Float64(j * k)) + 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])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (t <= -1.1e+160)
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
elseif ((t <= -3.2e-55) || ~((t <= 3.05e-139)))
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
else
tmp = (b * c) + ((-27.0 * (j * k)) + (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. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -1.1e+160], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -3.2e-55], N[Not[LessEqual[t, 3.05e-139]], $MachinePrecision]], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+160}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-55} \lor \neg \left(t \leq 3.05 \cdot 10^{-139}\right):\\
\;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + \left(-27 \cdot \left(j \cdot k\right) + 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 < -1.09999999999999996e160Initial program 75.0%
sub-neg75.0%
associate-+l-75.0%
sub-neg75.0%
sub-neg75.0%
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 t around inf 92.1%
if -1.09999999999999996e160 < t < -3.2000000000000001e-55 or 3.0499999999999999e-139 < t Initial program 88.9%
sub-neg88.9%
associate-+l-88.9%
sub-neg88.9%
sub-neg88.9%
distribute-rgt-out--91.9%
associate-*l*91.9%
distribute-lft-neg-in91.9%
cancel-sign-sub91.9%
associate-*l*91.2%
associate-*l*91.2%
Simplified91.2%
if -3.2000000000000001e-55 < t < 3.0499999999999999e-139Initial program 82.6%
Simplified87.0%
Taylor expanded in a around 0 93.2%
Final simplification92.0%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* y (* z t)))) (t_2 (* 4.0 (* t a))))
(if (<= x -6.8e-18)
(+ (* b c) (+ (* -27.0 (* j k)) (* x (+ t_1 (* i -4.0)))))
(if (<= x -3.1e-113)
(- (- (- (* b c) t_2) (* (* x 4.0) i)) (* (* j 27.0) k))
(if (<= x 2.6e+120)
(- (+ (* b c) (* 18.0 (* y (* t (* x z))))) (+ t_2 (* 27.0 (* j k))))
(* x (- t_1 (* 4.0 i))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (y * (z * t));
double t_2 = 4.0 * (t * a);
double tmp;
if (x <= -6.8e-18) {
tmp = (b * c) + ((-27.0 * (j * k)) + (x * (t_1 + (i * -4.0))));
} else if (x <= -3.1e-113) {
tmp = (((b * c) - t_2) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else if (x <= 2.6e+120) {
tmp = ((b * c) + (18.0 * (y * (t * (x * z))))) - (t_2 + (27.0 * (j * k)));
} else {
tmp = x * (t_1 - (4.0 * i));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 18.0d0 * (y * (z * t))
t_2 = 4.0d0 * (t * a)
if (x <= (-6.8d-18)) then
tmp = (b * c) + (((-27.0d0) * (j * k)) + (x * (t_1 + (i * (-4.0d0)))))
else if (x <= (-3.1d-113)) then
tmp = (((b * c) - t_2) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else if (x <= 2.6d+120) then
tmp = ((b * c) + (18.0d0 * (y * (t * (x * z))))) - (t_2 + (27.0d0 * (j * k)))
else
tmp = x * (t_1 - (4.0d0 * i))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (y * (z * t));
double t_2 = 4.0 * (t * a);
double tmp;
if (x <= -6.8e-18) {
tmp = (b * c) + ((-27.0 * (j * k)) + (x * (t_1 + (i * -4.0))));
} else if (x <= -3.1e-113) {
tmp = (((b * c) - t_2) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else if (x <= 2.6e+120) {
tmp = ((b * c) + (18.0 * (y * (t * (x * z))))) - (t_2 + (27.0 * (j * k)));
} else {
tmp = x * (t_1 - (4.0 * i));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (y * (z * t)) t_2 = 4.0 * (t * a) tmp = 0 if x <= -6.8e-18: tmp = (b * c) + ((-27.0 * (j * k)) + (x * (t_1 + (i * -4.0)))) elif x <= -3.1e-113: tmp = (((b * c) - t_2) - ((x * 4.0) * i)) - ((j * 27.0) * k) elif x <= 2.6e+120: tmp = ((b * c) + (18.0 * (y * (t * (x * z))))) - (t_2 + (27.0 * (j * k))) else: tmp = x * (t_1 - (4.0 * i)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(y * Float64(z * t))) t_2 = Float64(4.0 * Float64(t * a)) tmp = 0.0 if (x <= -6.8e-18) tmp = Float64(Float64(b * c) + Float64(Float64(-27.0 * Float64(j * k)) + Float64(x * Float64(t_1 + Float64(i * -4.0))))); elseif (x <= -3.1e-113) tmp = Float64(Float64(Float64(Float64(b * c) - t_2) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); elseif (x <= 2.6e+120) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(y * Float64(t * Float64(x * z))))) - Float64(t_2 + Float64(27.0 * Float64(j * k)))); else tmp = Float64(x * Float64(t_1 - Float64(4.0 * i))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (y * (z * t));
t_2 = 4.0 * (t * a);
tmp = 0.0;
if (x <= -6.8e-18)
tmp = (b * c) + ((-27.0 * (j * k)) + (x * (t_1 + (i * -4.0))));
elseif (x <= -3.1e-113)
tmp = (((b * c) - t_2) - ((x * 4.0) * i)) - ((j * 27.0) * k);
elseif (x <= 2.6e+120)
tmp = ((b * c) + (18.0 * (y * (t * (x * z))))) - (t_2 + (27.0 * (j * k)));
else
tmp = x * (t_1 - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.8e-18], N[(N[(b * c), $MachinePrecision] + N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(t$95$1 + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.1e-113], N[(N[(N[(N[(b * c), $MachinePrecision] - t$95$2), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.6e+120], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t$95$1 - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
t_2 := 4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;x \leq -6.8 \cdot 10^{-18}:\\
\;\;\;\;b \cdot c + \left(-27 \cdot \left(j \cdot k\right) + x \cdot \left(t_1 + i \cdot -4\right)\right)\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-113}:\\
\;\;\;\;\left(\left(b \cdot c - t_2\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+120}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - \left(t_2 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t_1 - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -6.80000000000000002e-18Initial program 81.4%
Simplified90.4%
Taylor expanded in a around 0 90.5%
if -6.80000000000000002e-18 < x < -3.10000000000000012e-113Initial program 99.9%
Taylor expanded in x around 0 99.9%
if -3.10000000000000012e-113 < x < 2.5999999999999999e120Initial program 92.6%
Taylor expanded in i around 0 87.6%
if 2.5999999999999999e120 < x Initial program 59.4%
sub-neg59.4%
associate-+l-59.4%
sub-neg59.4%
sub-neg59.4%
distribute-rgt-out--64.5%
associate-*l*72.1%
distribute-lft-neg-in72.1%
cancel-sign-sub72.1%
associate-*l*72.1%
associate-*l*72.1%
Simplified72.1%
Taylor expanded in x around inf 83.7%
Final simplification88.8%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))) (t_2 (+ (* b c) (* -4.0 (* t a)))))
(if (<= x -2e+244)
t_1
(if (<= x -5.8e+107)
(* x (* t (* z (* 18.0 y))))
(if (<= x -7.5e-27)
(- (* b c) (* 4.0 (* x i)))
(if (<= x -1.5e-111)
t_1
(if (<= x 5e-199)
t_2
(if (<= x 1.8e-179)
(* j (* k -27.0))
(if (<= x 3.7e-48)
t_2
(if (<= x 6e+56)
t_1
(if (<= x 2.5e+128)
t_2
(* x (* 18.0 (* z (* y t)))))))))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) + (-4.0 * (t * a));
double tmp;
if (x <= -2e+244) {
tmp = t_1;
} else if (x <= -5.8e+107) {
tmp = x * (t * (z * (18.0 * y)));
} else if (x <= -7.5e-27) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -1.5e-111) {
tmp = t_1;
} else if (x <= 5e-199) {
tmp = t_2;
} else if (x <= 1.8e-179) {
tmp = j * (k * -27.0);
} else if (x <= 3.7e-48) {
tmp = t_2;
} else if (x <= 6e+56) {
tmp = t_1;
} else if (x <= 2.5e+128) {
tmp = t_2;
} else {
tmp = x * (18.0 * (z * (y * t)));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) + (x * i))
t_2 = (b * c) + ((-4.0d0) * (t * a))
if (x <= (-2d+244)) then
tmp = t_1
else if (x <= (-5.8d+107)) then
tmp = x * (t * (z * (18.0d0 * y)))
else if (x <= (-7.5d-27)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= (-1.5d-111)) then
tmp = t_1
else if (x <= 5d-199) then
tmp = t_2
else if (x <= 1.8d-179) then
tmp = j * (k * (-27.0d0))
else if (x <= 3.7d-48) then
tmp = t_2
else if (x <= 6d+56) then
tmp = t_1
else if (x <= 2.5d+128) then
tmp = t_2
else
tmp = x * (18.0d0 * (z * (y * t)))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) + (-4.0 * (t * a));
double tmp;
if (x <= -2e+244) {
tmp = t_1;
} else if (x <= -5.8e+107) {
tmp = x * (t * (z * (18.0 * y)));
} else if (x <= -7.5e-27) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -1.5e-111) {
tmp = t_1;
} else if (x <= 5e-199) {
tmp = t_2;
} else if (x <= 1.8e-179) {
tmp = j * (k * -27.0);
} else if (x <= 3.7e-48) {
tmp = t_2;
} else if (x <= 6e+56) {
tmp = t_1;
} else if (x <= 2.5e+128) {
tmp = t_2;
} else {
tmp = x * (18.0 * (z * (y * t)));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) t_2 = (b * c) + (-4.0 * (t * a)) tmp = 0 if x <= -2e+244: tmp = t_1 elif x <= -5.8e+107: tmp = x * (t * (z * (18.0 * y))) elif x <= -7.5e-27: tmp = (b * c) - (4.0 * (x * i)) elif x <= -1.5e-111: tmp = t_1 elif x <= 5e-199: tmp = t_2 elif x <= 1.8e-179: tmp = j * (k * -27.0) elif x <= 3.7e-48: tmp = t_2 elif x <= 6e+56: tmp = t_1 elif x <= 2.5e+128: tmp = t_2 else: tmp = x * (18.0 * (z * (y * t))) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (x <= -2e+244) tmp = t_1; elseif (x <= -5.8e+107) tmp = Float64(x * Float64(t * Float64(z * Float64(18.0 * y)))); elseif (x <= -7.5e-27) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= -1.5e-111) tmp = t_1; elseif (x <= 5e-199) tmp = t_2; elseif (x <= 1.8e-179) tmp = Float64(j * Float64(k * -27.0)); elseif (x <= 3.7e-48) tmp = t_2; elseif (x <= 6e+56) tmp = t_1; elseif (x <= 2.5e+128) tmp = t_2; else tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((t * a) + (x * i));
t_2 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (x <= -2e+244)
tmp = t_1;
elseif (x <= -5.8e+107)
tmp = x * (t * (z * (18.0 * y)));
elseif (x <= -7.5e-27)
tmp = (b * c) - (4.0 * (x * i));
elseif (x <= -1.5e-111)
tmp = t_1;
elseif (x <= 5e-199)
tmp = t_2;
elseif (x <= 1.8e-179)
tmp = j * (k * -27.0);
elseif (x <= 3.7e-48)
tmp = t_2;
elseif (x <= 6e+56)
tmp = t_1;
elseif (x <= 2.5e+128)
tmp = t_2;
else
tmp = x * (18.0 * (z * (y * t)));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2e+244], t$95$1, If[LessEqual[x, -5.8e+107], N[(x * N[(t * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -7.5e-27], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.5e-111], t$95$1, If[LessEqual[x, 5e-199], t$95$2, If[LessEqual[x, 1.8e-179], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e-48], t$95$2, If[LessEqual[x, 6e+56], t$95$1, If[LessEqual[x, 2.5e+128], t$95$2, N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{+244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \left(t \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-27}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-111}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-199}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-179}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{-48}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+128}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.00000000000000015e244 or -7.50000000000000029e-27 < x < -1.50000000000000004e-111 or 3.6999999999999998e-48 < x < 6.00000000000000012e56Initial program 87.1%
sub-neg87.1%
+-commutative87.1%
associate-*l*87.1%
distribute-rgt-neg-in87.1%
fma-def87.1%
*-commutative87.1%
distribute-rgt-neg-in87.1%
metadata-eval87.1%
sub-neg87.1%
+-commutative87.1%
associate-*l*87.1%
distribute-rgt-neg-in87.1%
Simplified85.3%
Taylor expanded in y around 0 85.6%
fma-def89.4%
distribute-lft-out89.4%
*-commutative89.4%
Simplified89.4%
Taylor expanded in j around 0 64.0%
Taylor expanded in c around 0 64.0%
if -2.00000000000000015e244 < x < -5.79999999999999975e107Initial program 79.2%
sub-neg79.2%
associate-+l-79.2%
sub-neg79.2%
sub-neg79.2%
distribute-rgt-out--85.2%
associate-*l*90.9%
distribute-lft-neg-in90.9%
cancel-sign-sub90.9%
associate-*l*90.9%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in j around 0 82.1%
pow182.1%
*-commutative82.1%
Applied egg-rr82.1%
unpow182.1%
*-commutative82.1%
associate-*r*85.0%
Simplified85.0%
Taylor expanded in x around inf 73.2%
*-commutative73.2%
cancel-sign-sub-inv73.2%
associate-*r*73.2%
metadata-eval73.2%
fma-def73.2%
*-commutative73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in y around inf 64.5%
associate-*r*64.5%
*-commutative64.5%
*-commutative64.5%
associate-*l*67.5%
*-commutative67.5%
Simplified67.5%
if -5.79999999999999975e107 < x < -7.50000000000000029e-27Initial program 92.7%
sub-neg92.7%
associate-+l-92.7%
sub-neg92.7%
sub-neg92.7%
distribute-rgt-out--92.7%
associate-*l*92.7%
distribute-lft-neg-in92.7%
cancel-sign-sub92.7%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in t around 0 61.6%
Taylor expanded in k around 0 51.6%
if -1.50000000000000004e-111 < x < 4.9999999999999996e-199 or 1.80000000000000004e-179 < x < 3.6999999999999998e-48 or 6.00000000000000012e56 < x < 2.5e128Initial program 91.8%
sub-neg91.8%
+-commutative91.8%
associate-*l*91.8%
distribute-rgt-neg-in91.8%
fma-def94.8%
*-commutative94.8%
distribute-rgt-neg-in94.8%
metadata-eval94.8%
sub-neg94.8%
+-commutative94.8%
associate-*l*93.9%
distribute-rgt-neg-in93.9%
Simplified87.9%
Taylor expanded in y around 0 85.5%
fma-def86.6%
distribute-lft-out86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in j around 0 64.6%
Taylor expanded in i around 0 62.0%
*-commutative62.0%
Simplified62.0%
if 4.9999999999999996e-199 < x < 1.80000000000000004e-179Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
Simplified99.8%
Taylor expanded in j around inf 85.2%
associate-*r*85.0%
*-commutative85.0%
*-commutative85.0%
*-commutative85.0%
Simplified85.0%
if 2.5e128 < x Initial program 59.9%
sub-neg59.9%
associate-+l-59.9%
sub-neg59.9%
sub-neg59.9%
distribute-rgt-out--65.3%
associate-*l*70.5%
distribute-lft-neg-in70.5%
cancel-sign-sub70.5%
associate-*l*70.5%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in j around 0 74.7%
pow174.7%
*-commutative74.7%
Applied egg-rr74.7%
unpow174.7%
*-commutative74.7%
associate-*r*74.7%
Simplified74.7%
Taylor expanded in x around inf 85.5%
*-commutative85.5%
cancel-sign-sub-inv85.5%
associate-*r*85.5%
metadata-eval85.5%
fma-def85.5%
*-commutative85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y around inf 60.5%
*-commutative60.5%
*-commutative60.5%
associate-*l*63.0%
Simplified63.0%
Final simplification62.7%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k)))
(t_2 (- (* b c) (* 4.0 (* x i))))
(t_3 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -5.2e+14)
t_3
(if (<= t -4.9e-29)
t_2
(if (<= t -1.2e-81)
t_3
(if (<= t 3.2e-194)
t_2
(if (<= t 6.5e-45)
(- (* 4.0 (* x (- i))) t_1)
(if (<= t 3.2e+49)
(+ (* b c) (* -4.0 (* t a)))
(if (<= t 2.8e+129) (- (* b c) t_1) t_3)))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (b * c) - (4.0 * (x * i));
double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -5.2e+14) {
tmp = t_3;
} else if (t <= -4.9e-29) {
tmp = t_2;
} else if (t <= -1.2e-81) {
tmp = t_3;
} else if (t <= 3.2e-194) {
tmp = t_2;
} else if (t <= 6.5e-45) {
tmp = (4.0 * (x * -i)) - t_1;
} else if (t <= 3.2e+49) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t <= 2.8e+129) {
tmp = (b * c) - t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = (b * c) - (4.0d0 * (x * i))
t_3 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-5.2d+14)) then
tmp = t_3
else if (t <= (-4.9d-29)) then
tmp = t_2
else if (t <= (-1.2d-81)) then
tmp = t_3
else if (t <= 3.2d-194) then
tmp = t_2
else if (t <= 6.5d-45) then
tmp = (4.0d0 * (x * -i)) - t_1
else if (t <= 3.2d+49) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if (t <= 2.8d+129) then
tmp = (b * c) - t_1
else
tmp = t_3
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (b * c) - (4.0 * (x * i));
double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -5.2e+14) {
tmp = t_3;
} else if (t <= -4.9e-29) {
tmp = t_2;
} else if (t <= -1.2e-81) {
tmp = t_3;
} else if (t <= 3.2e-194) {
tmp = t_2;
} else if (t <= 6.5e-45) {
tmp = (4.0 * (x * -i)) - t_1;
} else if (t <= 3.2e+49) {
tmp = (b * c) + (-4.0 * (t * a));
} else if (t <= 2.8e+129) {
tmp = (b * c) - t_1;
} else {
tmp = t_3;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) t_2 = (b * c) - (4.0 * (x * i)) t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -5.2e+14: tmp = t_3 elif t <= -4.9e-29: tmp = t_2 elif t <= -1.2e-81: tmp = t_3 elif t <= 3.2e-194: tmp = t_2 elif t <= 6.5e-45: tmp = (4.0 * (x * -i)) - t_1 elif t <= 3.2e+49: tmp = (b * c) + (-4.0 * (t * a)) elif t <= 2.8e+129: tmp = (b * c) - t_1 else: tmp = t_3 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) t_2 = Float64(Float64(b * c) - Float64(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 <= -5.2e+14) tmp = t_3; elseif (t <= -4.9e-29) tmp = t_2; elseif (t <= -1.2e-81) tmp = t_3; elseif (t <= 3.2e-194) tmp = t_2; elseif (t <= 6.5e-45) tmp = Float64(Float64(4.0 * Float64(x * Float64(-i))) - t_1); elseif (t <= 3.2e+49) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (t <= 2.8e+129) tmp = Float64(Float64(b * c) - t_1); else tmp = t_3; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
t_2 = (b * c) - (4.0 * (x * i));
t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -5.2e+14)
tmp = t_3;
elseif (t <= -4.9e-29)
tmp = t_2;
elseif (t <= -1.2e-81)
tmp = t_3;
elseif (t <= 3.2e-194)
tmp = t_2;
elseif (t <= 6.5e-45)
tmp = (4.0 * (x * -i)) - t_1;
elseif (t <= 3.2e+49)
tmp = (b * c) + (-4.0 * (t * a));
elseif (t <= 2.8e+129)
tmp = (b * c) - 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(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, -5.2e+14], t$95$3, If[LessEqual[t, -4.9e-29], t$95$2, If[LessEqual[t, -1.2e-81], t$95$3, If[LessEqual[t, 3.2e-194], t$95$2, If[LessEqual[t, 6.5e-45], N[(N[(4.0 * N[(x * (-i)), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 3.2e+49], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+129], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c - 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 -5.2 \cdot 10^{+14}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -4.9 \cdot 10^{-29}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-81}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-194}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-45}:\\
\;\;\;\;4 \cdot \left(x \cdot \left(-i\right)\right) - t_1\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+49}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+129}:\\
\;\;\;\;b \cdot c - t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -5.2e14 or -4.8999999999999998e-29 < t < -1.2e-81 or 2.79999999999999975e129 < t Initial program 81.1%
sub-neg81.1%
associate-+l-81.1%
sub-neg81.1%
sub-neg81.1%
distribute-rgt-out--83.6%
associate-*l*82.0%
distribute-lft-neg-in82.0%
cancel-sign-sub82.0%
associate-*l*81.2%
associate-*l*81.2%
Simplified81.2%
Taylor expanded in t around inf 76.3%
if -5.2e14 < t < -4.8999999999999998e-29 or -1.2e-81 < t < 3.2000000000000003e-194Initial program 86.2%
sub-neg86.2%
associate-+l-86.2%
sub-neg86.2%
sub-neg86.2%
distribute-rgt-out--86.2%
associate-*l*82.4%
distribute-lft-neg-in82.4%
cancel-sign-sub82.4%
associate-*l*82.4%
associate-*l*82.4%
Simplified82.4%
Taylor expanded in t around 0 84.2%
Taylor expanded in k around 0 68.2%
if 3.2000000000000003e-194 < t < 6.4999999999999995e-45Initial program 88.6%
sub-neg88.6%
associate-+l-88.6%
sub-neg88.6%
sub-neg88.6%
distribute-rgt-out--88.6%
associate-*l*92.2%
distribute-lft-neg-in92.2%
cancel-sign-sub92.2%
associate-*l*92.2%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in t around 0 77.4%
Taylor expanded in c around 0 66.1%
if 6.4999999999999995e-45 < t < 3.20000000000000014e49Initial program 88.5%
sub-neg88.5%
+-commutative88.5%
associate-*l*88.6%
distribute-rgt-neg-in88.6%
fma-def88.6%
*-commutative88.6%
distribute-rgt-neg-in88.6%
metadata-eval88.6%
sub-neg88.6%
+-commutative88.6%
associate-*l*88.6%
distribute-rgt-neg-in88.6%
Simplified100.0%
Taylor expanded in y around 0 88.6%
fma-def88.6%
distribute-lft-out88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in j around 0 71.6%
Taylor expanded in i around 0 65.9%
*-commutative65.9%
Simplified65.9%
if 3.20000000000000014e49 < t < 2.79999999999999975e129Initial program 94.6%
sub-neg94.6%
associate-+l-94.6%
sub-neg94.6%
sub-neg94.6%
distribute-rgt-out--99.8%
associate-*l*94.6%
distribute-lft-neg-in94.6%
cancel-sign-sub94.6%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in t around 0 71.6%
Taylor expanded in i around 0 68.9%
Final simplification71.6%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))) (t_2 (+ (* b c) (* -4.0 (* t a)))))
(if (<= x -2.45e+244)
t_1
(if (<= x -2.75e+107)
(* x (* t (* z (* 18.0 y))))
(if (<= x -3.5e-28)
(- (* b c) (* 4.0 (* x i)))
(if (<= x -1.3e-111)
t_1
(if (<= x 3.05e-199)
t_2
(if (<= x 1.42e-53)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 1.45e+40)
t_1
(if (<= x 9.5e+126) t_2 (* x (* 18.0 (* z (* y t))))))))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) + (-4.0 * (t * a));
double tmp;
if (x <= -2.45e+244) {
tmp = t_1;
} else if (x <= -2.75e+107) {
tmp = x * (t * (z * (18.0 * y)));
} else if (x <= -3.5e-28) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -1.3e-111) {
tmp = t_1;
} else if (x <= 3.05e-199) {
tmp = t_2;
} else if (x <= 1.42e-53) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 1.45e+40) {
tmp = t_1;
} else if (x <= 9.5e+126) {
tmp = t_2;
} else {
tmp = x * (18.0 * (z * (y * t)));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) + (x * i))
t_2 = (b * c) + ((-4.0d0) * (t * a))
if (x <= (-2.45d+244)) then
tmp = t_1
else if (x <= (-2.75d+107)) then
tmp = x * (t * (z * (18.0d0 * y)))
else if (x <= (-3.5d-28)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= (-1.3d-111)) then
tmp = t_1
else if (x <= 3.05d-199) then
tmp = t_2
else if (x <= 1.42d-53) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 1.45d+40) then
tmp = t_1
else if (x <= 9.5d+126) then
tmp = t_2
else
tmp = x * (18.0d0 * (z * (y * t)))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = (b * c) + (-4.0 * (t * a));
double tmp;
if (x <= -2.45e+244) {
tmp = t_1;
} else if (x <= -2.75e+107) {
tmp = x * (t * (z * (18.0 * y)));
} else if (x <= -3.5e-28) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -1.3e-111) {
tmp = t_1;
} else if (x <= 3.05e-199) {
tmp = t_2;
} else if (x <= 1.42e-53) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 1.45e+40) {
tmp = t_1;
} else if (x <= 9.5e+126) {
tmp = t_2;
} else {
tmp = x * (18.0 * (z * (y * t)));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) t_2 = (b * c) + (-4.0 * (t * a)) tmp = 0 if x <= -2.45e+244: tmp = t_1 elif x <= -2.75e+107: tmp = x * (t * (z * (18.0 * y))) elif x <= -3.5e-28: tmp = (b * c) - (4.0 * (x * i)) elif x <= -1.3e-111: tmp = t_1 elif x <= 3.05e-199: tmp = t_2 elif x <= 1.42e-53: tmp = (b * c) - (27.0 * (j * k)) elif x <= 1.45e+40: tmp = t_1 elif x <= 9.5e+126: tmp = t_2 else: tmp = x * (18.0 * (z * (y * t))) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (x <= -2.45e+244) tmp = t_1; elseif (x <= -2.75e+107) tmp = Float64(x * Float64(t * Float64(z * Float64(18.0 * y)))); elseif (x <= -3.5e-28) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= -1.3e-111) tmp = t_1; elseif (x <= 3.05e-199) tmp = t_2; elseif (x <= 1.42e-53) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 1.45e+40) tmp = t_1; elseif (x <= 9.5e+126) tmp = t_2; else tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((t * a) + (x * i));
t_2 = (b * c) + (-4.0 * (t * a));
tmp = 0.0;
if (x <= -2.45e+244)
tmp = t_1;
elseif (x <= -2.75e+107)
tmp = x * (t * (z * (18.0 * y)));
elseif (x <= -3.5e-28)
tmp = (b * c) - (4.0 * (x * i));
elseif (x <= -1.3e-111)
tmp = t_1;
elseif (x <= 3.05e-199)
tmp = t_2;
elseif (x <= 1.42e-53)
tmp = (b * c) - (27.0 * (j * k));
elseif (x <= 1.45e+40)
tmp = t_1;
elseif (x <= 9.5e+126)
tmp = t_2;
else
tmp = x * (18.0 * (z * (y * t)));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.45e+244], t$95$1, If[LessEqual[x, -2.75e+107], N[(x * N[(t * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.5e-28], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.3e-111], t$95$1, If[LessEqual[x, 3.05e-199], t$95$2, If[LessEqual[x, 1.42e-53], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.45e+40], t$95$1, If[LessEqual[x, 9.5e+126], t$95$2, N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;x \leq -2.45 \cdot 10^{+244}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.75 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \left(t \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-28}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-111}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.05 \cdot 10^{-199}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.42 \cdot 10^{-53}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{+126}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -2.45e244 or -3.5e-28 < x < -1.29999999999999991e-111 or 1.41999999999999992e-53 < x < 1.45000000000000009e40Initial program 86.7%
sub-neg86.7%
+-commutative86.7%
associate-*l*86.7%
distribute-rgt-neg-in86.7%
fma-def88.6%
*-commutative88.6%
distribute-rgt-neg-in88.6%
metadata-eval88.6%
sub-neg88.6%
+-commutative88.6%
associate-*l*88.6%
distribute-rgt-neg-in88.6%
Simplified86.8%
Taylor expanded in y around 0 87.1%
fma-def91.0%
distribute-lft-out91.0%
*-commutative91.0%
Simplified91.0%
Taylor expanded in j around 0 67.0%
Taylor expanded in c around 0 65.1%
if -2.45e244 < x < -2.7500000000000002e107Initial program 79.2%
sub-neg79.2%
associate-+l-79.2%
sub-neg79.2%
sub-neg79.2%
distribute-rgt-out--85.2%
associate-*l*90.9%
distribute-lft-neg-in90.9%
cancel-sign-sub90.9%
associate-*l*90.9%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in j around 0 82.1%
pow182.1%
*-commutative82.1%
Applied egg-rr82.1%
unpow182.1%
*-commutative82.1%
associate-*r*85.0%
Simplified85.0%
Taylor expanded in x around inf 73.2%
*-commutative73.2%
cancel-sign-sub-inv73.2%
associate-*r*73.2%
metadata-eval73.2%
fma-def73.2%
*-commutative73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in y around inf 64.5%
associate-*r*64.5%
*-commutative64.5%
*-commutative64.5%
associate-*l*67.5%
*-commutative67.5%
Simplified67.5%
if -2.7500000000000002e107 < x < -3.5e-28Initial program 92.7%
sub-neg92.7%
associate-+l-92.7%
sub-neg92.7%
sub-neg92.7%
distribute-rgt-out--92.7%
associate-*l*92.7%
distribute-lft-neg-in92.7%
cancel-sign-sub92.7%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in t around 0 61.6%
Taylor expanded in k around 0 51.6%
if -1.29999999999999991e-111 < x < 3.05e-199 or 1.45000000000000009e40 < x < 9.49999999999999951e126Initial program 91.0%
sub-neg91.0%
+-commutative91.0%
associate-*l*91.0%
distribute-rgt-neg-in91.0%
fma-def93.6%
*-commutative93.6%
distribute-rgt-neg-in93.6%
metadata-eval93.6%
sub-neg93.6%
+-commutative93.6%
associate-*l*92.3%
distribute-rgt-neg-in92.3%
Simplified86.1%
Taylor expanded in y around 0 88.0%
fma-def88.0%
distribute-lft-out88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in j around 0 67.6%
Taylor expanded in i around 0 66.6%
*-commutative66.6%
Simplified66.6%
if 3.05e-199 < x < 1.41999999999999992e-53Initial program 96.4%
sub-neg96.4%
associate-+l-96.4%
sub-neg96.4%
sub-neg96.4%
distribute-rgt-out--96.4%
associate-*l*92.9%
distribute-lft-neg-in92.9%
cancel-sign-sub92.9%
associate-*l*92.9%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in t around 0 64.2%
Taylor expanded in i around 0 58.9%
if 9.49999999999999951e126 < x Initial program 59.9%
sub-neg59.9%
associate-+l-59.9%
sub-neg59.9%
sub-neg59.9%
distribute-rgt-out--65.3%
associate-*l*70.5%
distribute-lft-neg-in70.5%
cancel-sign-sub70.5%
associate-*l*70.5%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in j around 0 74.7%
pow174.7%
*-commutative74.7%
Applied egg-rr74.7%
unpow174.7%
*-commutative74.7%
associate-*r*74.7%
Simplified74.7%
Taylor expanded in x around inf 85.5%
*-commutative85.5%
cancel-sign-sub-inv85.5%
associate-*r*85.5%
metadata-eval85.5%
fma-def85.5%
*-commutative85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y around inf 60.5%
*-commutative60.5%
*-commutative60.5%
associate-*l*63.0%
Simplified63.0%
Final simplification63.4%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 27.0 (* j k)))
(t_2 (- (* b c) (+ t_1 (* 4.0 (* x i)))))
(t_3 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -2.15e+96)
t_3
(if (<= t -1.65e-64)
t_2
(if (<= t -1.9e-107)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= t 1.72e-74)
t_2
(if (<= t 3.4e+182) (- (+ (* b c) (* -4.0 (* t a))) t_1) t_3)))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (b * c) - (t_1 + (4.0 * (x * i)));
double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -2.15e+96) {
tmp = t_3;
} else if (t <= -1.65e-64) {
tmp = t_2;
} else if (t <= -1.9e-107) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 1.72e-74) {
tmp = t_2;
} else if (t <= 3.4e+182) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = t_3;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (j * k)
t_2 = (b * c) - (t_1 + (4.0d0 * (x * i)))
t_3 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-2.15d+96)) then
tmp = t_3
else if (t <= (-1.65d-64)) then
tmp = t_2
else if (t <= (-1.9d-107)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (t <= 1.72d-74) then
tmp = t_2
else if (t <= 3.4d+182) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - t_1
else
tmp = t_3
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 27.0 * (j * k);
double t_2 = (b * c) - (t_1 + (4.0 * (x * i)));
double t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -2.15e+96) {
tmp = t_3;
} else if (t <= -1.65e-64) {
tmp = t_2;
} else if (t <= -1.9e-107) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 1.72e-74) {
tmp = t_2;
} else if (t <= 3.4e+182) {
tmp = ((b * c) + (-4.0 * (t * a))) - t_1;
} else {
tmp = t_3;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 27.0 * (j * k) t_2 = (b * c) - (t_1 + (4.0 * (x * i))) t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -2.15e+96: tmp = t_3 elif t <= -1.65e-64: tmp = t_2 elif t <= -1.9e-107: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif t <= 1.72e-74: tmp = t_2 elif t <= 3.4e+182: tmp = ((b * c) + (-4.0 * (t * a))) - t_1 else: tmp = t_3 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(27.0 * Float64(j * k)) t_2 = Float64(Float64(b * c) - Float64(t_1 + 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 <= -2.15e+96) tmp = t_3; elseif (t <= -1.65e-64) tmp = t_2; elseif (t <= -1.9e-107) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (t <= 1.72e-74) tmp = t_2; elseif (t <= 3.4e+182) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - t_1); else tmp = t_3; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 27.0 * (j * k);
t_2 = (b * c) - (t_1 + (4.0 * (x * i)));
t_3 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -2.15e+96)
tmp = t_3;
elseif (t <= -1.65e-64)
tmp = t_2;
elseif (t <= -1.9e-107)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (t <= 1.72e-74)
tmp = t_2;
elseif (t <= 3.4e+182)
tmp = ((b * c) + (-4.0 * (t * a))) - 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.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(t$95$1 + N[(4.0 * N[(x * i), $MachinePrecision]), $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, -2.15e+96], t$95$3, If[LessEqual[t, -1.65e-64], t$95$2, If[LessEqual[t, -1.9e-107], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.72e-74], t$95$2, If[LessEqual[t, 3.4e+182], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(j \cdot k\right)\\
t_2 := b \cdot c - \left(t_1 + 4 \cdot \left(x \cdot i\right)\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 -2.15 \cdot 10^{+96}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-64}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 1.72 \cdot 10^{-74}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+182}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -2.15000000000000001e96 or 3.39999999999999987e182 < t Initial program 76.0%
sub-neg76.0%
associate-+l-76.0%
sub-neg76.0%
sub-neg76.0%
distribute-rgt-out--78.6%
associate-*l*78.6%
distribute-lft-neg-in78.6%
cancel-sign-sub78.6%
associate-*l*78.6%
associate-*l*78.6%
Simplified78.6%
Taylor expanded in t around inf 84.4%
if -2.15000000000000001e96 < t < -1.65e-64 or -1.9000000000000001e-107 < t < 1.72e-74Initial program 88.8%
sub-neg88.8%
associate-+l-88.8%
sub-neg88.8%
sub-neg88.8%
distribute-rgt-out--88.8%
associate-*l*84.4%
distribute-lft-neg-in84.4%
cancel-sign-sub84.4%
associate-*l*84.4%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in t around 0 80.5%
if -1.65e-64 < t < -1.9000000000000001e-107Initial program 67.5%
sub-neg67.5%
associate-+l-67.5%
sub-neg67.5%
sub-neg67.5%
distribute-rgt-out--67.5%
associate-*l*75.9%
distribute-lft-neg-in75.9%
cancel-sign-sub75.9%
associate-*l*75.9%
associate-*l*75.9%
Simplified75.9%
Taylor expanded in x around inf 83.5%
if 1.72e-74 < t < 3.39999999999999987e182Initial program 92.8%
sub-neg92.8%
associate-+l-92.8%
sub-neg92.8%
sub-neg92.8%
distribute-rgt-out--96.3%
associate-*l*98.0%
distribute-lft-neg-in98.0%
cancel-sign-sub98.0%
associate-*l*96.3%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in x around 0 75.9%
Final simplification80.8%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))))
(if (<= x -1.22e-17)
(+ t_1 (* b c))
(if (<= x 5.2e+124)
(- (- (- (* b c) (* 4.0 (* t a))) (* (* x 4.0) i)) (* (* j 27.0) k))
t_1))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double tmp;
if (x <= -1.22e-17) {
tmp = t_1 + (b * c);
} else if (x <= 5.2e+124) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
if (x <= (-1.22d-17)) then
tmp = t_1 + (b * c)
else if (x <= 5.2d+124) then
tmp = (((b * c) - (4.0d0 * (t * a))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double tmp;
if (x <= -1.22e-17) {
tmp = t_1 + (b * c);
} else if (x <= 5.2e+124) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i)) tmp = 0 if x <= -1.22e-17: tmp = t_1 + (b * c) elif x <= 5.2e+124: tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -1.22e-17) tmp = Float64(t_1 + Float64(b * c)); elseif (x <= 5.2e+124) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
tmp = 0.0;
if (x <= -1.22e-17)
tmp = t_1 + (b * c);
elseif (x <= 5.2e+124)
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.22e-17], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.2e+124], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{-17}:\\
\;\;\;\;t_1 + b \cdot c\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+124}:\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.22e-17Initial program 81.4%
sub-neg81.4%
associate-+l-81.4%
sub-neg81.4%
sub-neg81.4%
distribute-rgt-out--84.1%
associate-*l*86.6%
distribute-lft-neg-in86.6%
cancel-sign-sub86.6%
associate-*l*86.6%
associate-*l*86.7%
Simplified86.7%
Taylor expanded in j around 0 78.8%
pow178.8%
*-commutative78.8%
Applied egg-rr78.8%
unpow178.8%
*-commutative78.8%
associate-*r*82.8%
Simplified82.8%
Taylor expanded in y around inf 80.4%
*-commutative80.4%
associate-*l*80.4%
*-commutative80.4%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in x around 0 85.6%
if -1.22e-17 < x < 5.2000000000000001e124Initial program 93.0%
Taylor expanded in x around 0 85.1%
if 5.2000000000000001e124 < x Initial program 60.9%
sub-neg60.9%
associate-+l-60.9%
sub-neg60.9%
sub-neg60.9%
distribute-rgt-out--66.2%
associate-*l*71.3%
distribute-lft-neg-in71.3%
cancel-sign-sub71.3%
associate-*l*71.3%
associate-*l*71.3%
Simplified71.3%
Taylor expanded in x around inf 85.9%
Final simplification85.4%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* y (* z t)))))
(if (<= x -3.4e-18)
(+ (* b c) (+ (* -27.0 (* j k)) (* x (+ t_1 (* i -4.0)))))
(if (<= x 9.8e+125)
(- (- (- (* b c) (* 4.0 (* t a))) (* (* x 4.0) i)) (* (* j 27.0) k))
(* x (- t_1 (* 4.0 i)))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (y * (z * t));
double tmp;
if (x <= -3.4e-18) {
tmp = (b * c) + ((-27.0 * (j * k)) + (x * (t_1 + (i * -4.0))));
} else if (x <= 9.8e+125) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = x * (t_1 - (4.0 * i));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = 18.0d0 * (y * (z * t))
if (x <= (-3.4d-18)) then
tmp = (b * c) + (((-27.0d0) * (j * k)) + (x * (t_1 + (i * (-4.0d0)))))
else if (x <= 9.8d+125) then
tmp = (((b * c) - (4.0d0 * (t * a))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = x * (t_1 - (4.0d0 * i))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (y * (z * t));
double tmp;
if (x <= -3.4e-18) {
tmp = (b * c) + ((-27.0 * (j * k)) + (x * (t_1 + (i * -4.0))));
} else if (x <= 9.8e+125) {
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = x * (t_1 - (4.0 * i));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (y * (z * t)) tmp = 0 if x <= -3.4e-18: tmp = (b * c) + ((-27.0 * (j * k)) + (x * (t_1 + (i * -4.0)))) elif x <= 9.8e+125: tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = x * (t_1 - (4.0 * i)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(y * Float64(z * t))) tmp = 0.0 if (x <= -3.4e-18) tmp = Float64(Float64(b * c) + Float64(Float64(-27.0 * Float64(j * k)) + Float64(x * Float64(t_1 + Float64(i * -4.0))))); elseif (x <= 9.8e+125) tmp = Float64(Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(x * Float64(t_1 - Float64(4.0 * i))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (y * (z * t));
tmp = 0.0;
if (x <= -3.4e-18)
tmp = (b * c) + ((-27.0 * (j * k)) + (x * (t_1 + (i * -4.0))));
elseif (x <= 9.8e+125)
tmp = (((b * c) - (4.0 * (t * a))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = x * (t_1 - (4.0 * i));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e-18], N[(N[(b * c), $MachinePrecision] + N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(t$95$1 + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 9.8e+125], N[(N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(t$95$1 - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{-18}:\\
\;\;\;\;b \cdot c + \left(-27 \cdot \left(j \cdot k\right) + x \cdot \left(t_1 + i \cdot -4\right)\right)\\
\mathbf{elif}\;x \leq 9.8 \cdot 10^{+125}:\\
\;\;\;\;\left(\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t_1 - 4 \cdot i\right)\\
\end{array}
\end{array}
if x < -3.40000000000000001e-18Initial program 81.4%
Simplified90.4%
Taylor expanded in a around 0 90.5%
if -3.40000000000000001e-18 < x < 9.80000000000000032e125Initial program 93.0%
Taylor expanded in x around 0 85.1%
if 9.80000000000000032e125 < x Initial program 60.9%
sub-neg60.9%
associate-+l-60.9%
sub-neg60.9%
sub-neg60.9%
distribute-rgt-out--66.2%
associate-*l*71.3%
distribute-lft-neg-in71.3%
cancel-sign-sub71.3%
associate-*l*71.3%
associate-*l*71.3%
Simplified71.3%
Taylor expanded in x around inf 85.9%
Final simplification86.8%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))) (t_2 (* -4.0 (+ (* t a) (* x i)))))
(if (<= x -1.95e+245)
t_2
(if (<= x -1.85e+102)
(* x (* t (* z (* 18.0 y))))
(if (<= x 4.6e-199)
t_1
(if (<= x 2.8e-179)
(* j (* k -27.0))
(if (<= x 2e-45)
t_1
(if (<= x 4.4e+55)
t_2
(if (<= x 3.2e+127) t_1 (* x (* 18.0 (* z (* y t)))))))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = -4.0 * ((t * a) + (x * i));
double tmp;
if (x <= -1.95e+245) {
tmp = t_2;
} else if (x <= -1.85e+102) {
tmp = x * (t * (z * (18.0 * y)));
} else if (x <= 4.6e-199) {
tmp = t_1;
} else if (x <= 2.8e-179) {
tmp = j * (k * -27.0);
} else if (x <= 2e-45) {
tmp = t_1;
} else if (x <= 4.4e+55) {
tmp = t_2;
} else if (x <= 3.2e+127) {
tmp = t_1;
} else {
tmp = x * (18.0 * (z * (y * t)));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
t_2 = (-4.0d0) * ((t * a) + (x * i))
if (x <= (-1.95d+245)) then
tmp = t_2
else if (x <= (-1.85d+102)) then
tmp = x * (t * (z * (18.0d0 * y)))
else if (x <= 4.6d-199) then
tmp = t_1
else if (x <= 2.8d-179) then
tmp = j * (k * (-27.0d0))
else if (x <= 2d-45) then
tmp = t_1
else if (x <= 4.4d+55) then
tmp = t_2
else if (x <= 3.2d+127) then
tmp = t_1
else
tmp = x * (18.0d0 * (z * (y * t)))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = -4.0 * ((t * a) + (x * i));
double tmp;
if (x <= -1.95e+245) {
tmp = t_2;
} else if (x <= -1.85e+102) {
tmp = x * (t * (z * (18.0 * y)));
} else if (x <= 4.6e-199) {
tmp = t_1;
} else if (x <= 2.8e-179) {
tmp = j * (k * -27.0);
} else if (x <= 2e-45) {
tmp = t_1;
} else if (x <= 4.4e+55) {
tmp = t_2;
} else if (x <= 3.2e+127) {
tmp = t_1;
} else {
tmp = x * (18.0 * (z * (y * t)));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) t_2 = -4.0 * ((t * a) + (x * i)) tmp = 0 if x <= -1.95e+245: tmp = t_2 elif x <= -1.85e+102: tmp = x * (t * (z * (18.0 * y))) elif x <= 4.6e-199: tmp = t_1 elif x <= 2.8e-179: tmp = j * (k * -27.0) elif x <= 2e-45: tmp = t_1 elif x <= 4.4e+55: tmp = t_2 elif x <= 3.2e+127: tmp = t_1 else: tmp = x * (18.0 * (z * (y * t))) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (x <= -1.95e+245) tmp = t_2; elseif (x <= -1.85e+102) tmp = Float64(x * Float64(t * Float64(z * Float64(18.0 * y)))); elseif (x <= 4.6e-199) tmp = t_1; elseif (x <= 2.8e-179) tmp = Float64(j * Float64(k * -27.0)); elseif (x <= 2e-45) tmp = t_1; elseif (x <= 4.4e+55) tmp = t_2; elseif (x <= 3.2e+127) tmp = t_1; else tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) + (-4.0 * (t * a));
t_2 = -4.0 * ((t * a) + (x * i));
tmp = 0.0;
if (x <= -1.95e+245)
tmp = t_2;
elseif (x <= -1.85e+102)
tmp = x * (t * (z * (18.0 * y)));
elseif (x <= 4.6e-199)
tmp = t_1;
elseif (x <= 2.8e-179)
tmp = j * (k * -27.0);
elseif (x <= 2e-45)
tmp = t_1;
elseif (x <= 4.4e+55)
tmp = t_2;
elseif (x <= 3.2e+127)
tmp = t_1;
else
tmp = x * (18.0 * (z * (y * t)));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.95e+245], t$95$2, If[LessEqual[x, -1.85e+102], N[(x * N[(t * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.6e-199], t$95$1, If[LessEqual[x, 2.8e-179], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-45], t$95$1, If[LessEqual[x, 4.4e+55], t$95$2, If[LessEqual[x, 3.2e+127], t$95$1, N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+245}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{+102}:\\
\;\;\;\;x \cdot \left(t \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-199}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-179}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+127}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.9499999999999999e245 or 1.99999999999999997e-45 < x < 4.40000000000000021e55Initial program 81.5%
sub-neg81.5%
+-commutative81.5%
associate-*l*81.5%
distribute-rgt-neg-in81.5%
fma-def81.5%
*-commutative81.5%
distribute-rgt-neg-in81.5%
metadata-eval81.5%
sub-neg81.5%
+-commutative81.5%
associate-*l*81.5%
distribute-rgt-neg-in81.5%
Simplified81.6%
Taylor expanded in y around 0 79.4%
fma-def84.8%
distribute-lft-out84.8%
*-commutative84.8%
Simplified84.8%
Taylor expanded in j around 0 61.4%
Taylor expanded in c around 0 64.1%
if -1.9499999999999999e245 < x < -1.85000000000000011e102Initial program 79.8%
sub-neg79.8%
associate-+l-79.8%
sub-neg79.8%
sub-neg79.8%
distribute-rgt-out--85.6%
associate-*l*91.2%
distribute-lft-neg-in91.2%
cancel-sign-sub91.2%
associate-*l*91.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in j around 0 79.8%
pow179.8%
*-commutative79.8%
Applied egg-rr79.8%
unpow179.8%
*-commutative79.8%
associate-*r*82.6%
Simplified82.6%
Taylor expanded in x around inf 71.1%
*-commutative71.1%
cancel-sign-sub-inv71.1%
associate-*r*71.1%
metadata-eval71.1%
fma-def71.1%
*-commutative71.1%
*-commutative71.1%
Simplified71.1%
Taylor expanded in y around inf 62.7%
associate-*r*62.7%
*-commutative62.7%
*-commutative62.7%
associate-*l*65.5%
*-commutative65.5%
Simplified65.5%
if -1.85000000000000011e102 < x < 4.6000000000000003e-199 or 2.8000000000000001e-179 < x < 1.99999999999999997e-45 or 4.40000000000000021e55 < x < 3.19999999999999976e127Initial program 92.9%
sub-neg92.9%
+-commutative92.9%
associate-*l*92.9%
distribute-rgt-neg-in92.9%
fma-def95.7%
*-commutative95.7%
distribute-rgt-neg-in95.7%
metadata-eval95.7%
sub-neg95.7%
+-commutative95.7%
associate-*l*95.0%
distribute-rgt-neg-in95.0%
Simplified90.9%
Taylor expanded in y around 0 85.1%
fma-def85.9%
distribute-lft-out85.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in j around 0 65.1%
Taylor expanded in i around 0 56.1%
*-commutative56.1%
Simplified56.1%
if 4.6000000000000003e-199 < x < 2.8000000000000001e-179Initial program 99.6%
sub-neg99.6%
+-commutative99.6%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*99.8%
distribute-rgt-neg-in99.8%
Simplified99.8%
Taylor expanded in j around inf 85.2%
associate-*r*85.0%
*-commutative85.0%
*-commutative85.0%
*-commutative85.0%
Simplified85.0%
if 3.19999999999999976e127 < x Initial program 59.9%
sub-neg59.9%
associate-+l-59.9%
sub-neg59.9%
sub-neg59.9%
distribute-rgt-out--65.3%
associate-*l*70.5%
distribute-lft-neg-in70.5%
cancel-sign-sub70.5%
associate-*l*70.5%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in j around 0 74.7%
pow174.7%
*-commutative74.7%
Applied egg-rr74.7%
unpow174.7%
*-commutative74.7%
associate-*r*74.7%
Simplified74.7%
Taylor expanded in x around inf 85.5%
*-commutative85.5%
cancel-sign-sub-inv85.5%
associate-*r*85.5%
metadata-eval85.5%
fma-def85.5%
*-commutative85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y around inf 60.5%
*-commutative60.5%
*-commutative60.5%
associate-*l*63.0%
Simplified63.0%
Final simplification60.3%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a))) (t_2 (- t_1 (* 27.0 (* j k)))))
(if (<= x -7.2e+244)
(* -4.0 (+ (* t a) (* x i)))
(if (<= x -1.45e+107)
(* x (* t (* z (* 18.0 y))))
(if (<= x -1.55e-29)
(- (* b c) (* 4.0 (* x i)))
(if (<= x -4e-155)
t_2
(if (<= x 2.1e-294)
(+ (* b c) t_1)
(if (<= x 3.2e+128) t_2 (* x (* 18.0 (* z (* y t))))))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = t_1 - (27.0 * (j * k));
double tmp;
if (x <= -7.2e+244) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (x <= -1.45e+107) {
tmp = x * (t * (z * (18.0 * y)));
} else if (x <= -1.55e-29) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -4e-155) {
tmp = t_2;
} else if (x <= 2.1e-294) {
tmp = (b * c) + t_1;
} else if (x <= 3.2e+128) {
tmp = t_2;
} else {
tmp = x * (18.0 * (z * (y * t)));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = t_1 - (27.0d0 * (j * k))
if (x <= (-7.2d+244)) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (x <= (-1.45d+107)) then
tmp = x * (t * (z * (18.0d0 * y)))
else if (x <= (-1.55d-29)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= (-4d-155)) then
tmp = t_2
else if (x <= 2.1d-294) then
tmp = (b * c) + t_1
else if (x <= 3.2d+128) then
tmp = t_2
else
tmp = x * (18.0d0 * (z * (y * t)))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (t * a);
double t_2 = t_1 - (27.0 * (j * k));
double tmp;
if (x <= -7.2e+244) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (x <= -1.45e+107) {
tmp = x * (t * (z * (18.0 * y)));
} else if (x <= -1.55e-29) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= -4e-155) {
tmp = t_2;
} else if (x <= 2.1e-294) {
tmp = (b * c) + t_1;
} else if (x <= 3.2e+128) {
tmp = t_2;
} else {
tmp = x * (18.0 * (z * (y * t)));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = t_1 - (27.0 * (j * k)) tmp = 0 if x <= -7.2e+244: tmp = -4.0 * ((t * a) + (x * i)) elif x <= -1.45e+107: tmp = x * (t * (z * (18.0 * y))) elif x <= -1.55e-29: tmp = (b * c) - (4.0 * (x * i)) elif x <= -4e-155: tmp = t_2 elif x <= 2.1e-294: tmp = (b * c) + t_1 elif x <= 3.2e+128: tmp = t_2 else: tmp = x * (18.0 * (z * (y * t))) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(t_1 - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (x <= -7.2e+244) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif (x <= -1.45e+107) tmp = Float64(x * Float64(t * Float64(z * Float64(18.0 * y)))); elseif (x <= -1.55e-29) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= -4e-155) tmp = t_2; elseif (x <= 2.1e-294) tmp = Float64(Float64(b * c) + t_1); elseif (x <= 3.2e+128) tmp = t_2; else tmp = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * (t * a);
t_2 = t_1 - (27.0 * (j * k));
tmp = 0.0;
if (x <= -7.2e+244)
tmp = -4.0 * ((t * a) + (x * i));
elseif (x <= -1.45e+107)
tmp = x * (t * (z * (18.0 * y)));
elseif (x <= -1.55e-29)
tmp = (b * c) - (4.0 * (x * i));
elseif (x <= -4e-155)
tmp = t_2;
elseif (x <= 2.1e-294)
tmp = (b * c) + t_1;
elseif (x <= 3.2e+128)
tmp = t_2;
else
tmp = x * (18.0 * (z * (y * t)));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.2e+244], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.45e+107], N[(x * N[(t * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.55e-29], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-155], t$95$2, If[LessEqual[x, 2.1e-294], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[x, 3.2e+128], t$95$2, N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := t_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{+244}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{+107}:\\
\;\;\;\;x \cdot \left(t \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{-29}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-155}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-294}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+128}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if x < -7.1999999999999999e244Initial program 69.6%
sub-neg69.6%
+-commutative69.6%
associate-*l*69.6%
distribute-rgt-neg-in69.6%
fma-def69.6%
*-commutative69.6%
distribute-rgt-neg-in69.6%
metadata-eval69.6%
sub-neg69.6%
+-commutative69.6%
associate-*l*69.6%
distribute-rgt-neg-in69.6%
Simplified69.6%
Taylor expanded in y around 0 88.0%
fma-def94.2%
distribute-lft-out94.2%
*-commutative94.2%
Simplified94.2%
Taylor expanded in j around 0 81.7%
Taylor expanded in c around 0 88.0%
if -7.1999999999999999e244 < x < -1.44999999999999994e107Initial program 79.2%
sub-neg79.2%
associate-+l-79.2%
sub-neg79.2%
sub-neg79.2%
distribute-rgt-out--85.2%
associate-*l*90.9%
distribute-lft-neg-in90.9%
cancel-sign-sub90.9%
associate-*l*90.9%
associate-*l*90.9%
Simplified90.9%
Taylor expanded in j around 0 82.1%
pow182.1%
*-commutative82.1%
Applied egg-rr82.1%
unpow182.1%
*-commutative82.1%
associate-*r*85.0%
Simplified85.0%
Taylor expanded in x around inf 73.2%
*-commutative73.2%
cancel-sign-sub-inv73.2%
associate-*r*73.2%
metadata-eval73.2%
fma-def73.2%
*-commutative73.2%
*-commutative73.2%
Simplified73.2%
Taylor expanded in y around inf 64.5%
associate-*r*64.5%
*-commutative64.5%
*-commutative64.5%
associate-*l*67.5%
*-commutative67.5%
Simplified67.5%
if -1.44999999999999994e107 < x < -1.55000000000000013e-29Initial program 93.0%
sub-neg93.0%
associate-+l-93.0%
sub-neg93.0%
sub-neg93.0%
distribute-rgt-out--93.0%
associate-*l*92.9%
distribute-lft-neg-in92.9%
cancel-sign-sub92.9%
associate-*l*92.9%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in t around 0 62.9%
Taylor expanded in k around 0 53.3%
if -1.55000000000000013e-29 < x < -4.00000000000000006e-155 or 2.09999999999999984e-294 < x < 3.19999999999999986e128Initial program 91.4%
sub-neg91.4%
associate-+l-91.4%
sub-neg91.4%
sub-neg91.4%
distribute-rgt-out--91.4%
associate-*l*89.4%
distribute-lft-neg-in89.4%
cancel-sign-sub89.4%
associate-*l*89.4%
associate-*l*89.4%
Simplified89.4%
Taylor expanded in x around 0 72.4%
Taylor expanded in c around 0 59.9%
if -4.00000000000000006e-155 < x < 2.09999999999999984e-294Initial program 97.1%
sub-neg97.1%
+-commutative97.1%
associate-*l*97.1%
distribute-rgt-neg-in97.1%
fma-def99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*97.3%
distribute-rgt-neg-in97.3%
Simplified84.3%
Taylor expanded in y around 0 92.1%
fma-def92.2%
distribute-lft-out92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in j around 0 77.6%
Taylor expanded in i around 0 76.9%
*-commutative76.9%
Simplified76.9%
if 3.19999999999999986e128 < x Initial program 59.9%
sub-neg59.9%
associate-+l-59.9%
sub-neg59.9%
sub-neg59.9%
distribute-rgt-out--65.3%
associate-*l*70.5%
distribute-lft-neg-in70.5%
cancel-sign-sub70.5%
associate-*l*70.5%
associate-*l*70.5%
Simplified70.5%
Taylor expanded in j around 0 74.7%
pow174.7%
*-commutative74.7%
Applied egg-rr74.7%
unpow174.7%
*-commutative74.7%
associate-*r*74.7%
Simplified74.7%
Taylor expanded in x around inf 85.5%
*-commutative85.5%
cancel-sign-sub-inv85.5%
associate-*r*85.5%
metadata-eval85.5%
fma-def85.5%
*-commutative85.5%
*-commutative85.5%
Simplified85.5%
Taylor expanded in y around inf 60.5%
*-commutative60.5%
*-commutative60.5%
associate-*l*63.0%
Simplified63.0%
Final simplification64.8%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (+ (* 27.0 (* j k)) (* 4.0 (* x i)))))
(t_2 (* t (- (* 18.0 (* y (* x z))) (* a 4.0)))))
(if (<= t -2.3e+96)
t_2
(if (<= t -1.1e-64)
t_1
(if (<= t -1.9e-107)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= t 5.8e+144) t_1 t_2))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -2.3e+96) {
tmp = t_2;
} else if (t <= -1.1e-64) {
tmp = t_1;
} else if (t <= -1.9e-107) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 5.8e+144) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - ((27.0d0 * (j * k)) + (4.0d0 * (x * i)))
t_2 = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
if (t <= (-2.3d+96)) then
tmp = t_2
else if (t <= (-1.1d-64)) then
tmp = t_1
else if (t <= (-1.9d-107)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (t <= 5.8d+144) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
double t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
double tmp;
if (t <= -2.3e+96) {
tmp = t_2;
} else if (t <= -1.1e-64) {
tmp = t_1;
} else if (t <= -1.9e-107) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (t <= 5.8e+144) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i))) t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0)) tmp = 0 if t <= -2.3e+96: tmp = t_2 elif t <= -1.1e-64: tmp = t_1 elif t <= -1.9e-107: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif t <= 5.8e+144: tmp = t_1 else: tmp = t_2 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(Float64(27.0 * Float64(j * k)) + Float64(4.0 * Float64(x * i)))) t_2 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -2.3e+96) tmp = t_2; elseif (t <= -1.1e-64) tmp = t_1; elseif (t <= -1.9e-107) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (t <= 5.8e+144) tmp = t_1; else tmp = t_2; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (b * c) - ((27.0 * (j * k)) + (4.0 * (x * i)));
t_2 = t * ((18.0 * (y * (x * z))) - (a * 4.0));
tmp = 0.0;
if (t <= -2.3e+96)
tmp = t_2;
elseif (t <= -1.1e-64)
tmp = t_1;
elseif (t <= -1.9e-107)
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
elseif (t <= 5.8e+144)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+96], t$95$2, If[LessEqual[t, -1.1e-64], t$95$1, If[LessEqual[t, -1.9e-107], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+144], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c - \left(27 \cdot \left(j \cdot k\right) + 4 \cdot \left(x \cdot i\right)\right)\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+96}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-107}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+144}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.30000000000000015e96 or 5.79999999999999996e144 < t Initial program 79.0%
sub-neg79.0%
associate-+l-79.0%
sub-neg79.0%
sub-neg79.0%
distribute-rgt-out--81.3%
associate-*l*81.3%
distribute-lft-neg-in81.3%
cancel-sign-sub81.3%
associate-*l*81.3%
associate-*l*81.3%
Simplified81.3%
Taylor expanded in t around inf 82.4%
if -2.30000000000000015e96 < t < -1.1e-64 or -1.9000000000000001e-107 < t < 5.79999999999999996e144Initial program 89.4%
sub-neg89.4%
associate-+l-89.4%
sub-neg89.4%
sub-neg89.4%
distribute-rgt-out--90.7%
associate-*l*88.2%
distribute-lft-neg-in88.2%
cancel-sign-sub88.2%
associate-*l*87.6%
associate-*l*87.6%
Simplified87.6%
Taylor expanded in t around 0 76.4%
if -1.1e-64 < t < -1.9000000000000001e-107Initial program 67.5%
sub-neg67.5%
associate-+l-67.5%
sub-neg67.5%
sub-neg67.5%
distribute-rgt-out--67.5%
associate-*l*75.9%
distribute-lft-neg-in75.9%
cancel-sign-sub75.9%
associate-*l*75.9%
associate-*l*75.9%
Simplified75.9%
Taylor expanded in x around inf 83.5%
Final simplification78.8%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i))))
(t_2 (* -4.0 (* t a)))
(t_3 (- t_2 (* 27.0 (* j k)))))
(if (<= x -4.8e-21)
t_1
(if (<= x -2e-155)
t_3
(if (<= x 7.8e-292) (+ (* b c) t_2) (if (<= x 3.7e+120) t_3 t_1))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double t_2 = -4.0 * (t * a);
double t_3 = t_2 - (27.0 * (j * k));
double tmp;
if (x <= -4.8e-21) {
tmp = t_1;
} else if (x <= -2e-155) {
tmp = t_3;
} else if (x <= 7.8e-292) {
tmp = (b * c) + t_2;
} else if (x <= 3.7e+120) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
t_2 = (-4.0d0) * (t * a)
t_3 = t_2 - (27.0d0 * (j * k))
if (x <= (-4.8d-21)) then
tmp = t_1
else if (x <= (-2d-155)) then
tmp = t_3
else if (x <= 7.8d-292) then
tmp = (b * c) + t_2
else if (x <= 3.7d+120) then
tmp = t_3
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double t_2 = -4.0 * (t * a);
double t_3 = t_2 - (27.0 * (j * k));
double tmp;
if (x <= -4.8e-21) {
tmp = t_1;
} else if (x <= -2e-155) {
tmp = t_3;
} else if (x <= 7.8e-292) {
tmp = (b * c) + t_2;
} else if (x <= 3.7e+120) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i)) t_2 = -4.0 * (t * a) t_3 = t_2 - (27.0 * (j * k)) tmp = 0 if x <= -4.8e-21: tmp = t_1 elif x <= -2e-155: tmp = t_3 elif x <= 7.8e-292: tmp = (b * c) + t_2 elif x <= 3.7e+120: tmp = t_3 else: tmp = t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))) t_2 = Float64(-4.0 * Float64(t * a)) t_3 = Float64(t_2 - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (x <= -4.8e-21) tmp = t_1; elseif (x <= -2e-155) tmp = t_3; elseif (x <= 7.8e-292) tmp = Float64(Float64(b * c) + t_2); elseif (x <= 3.7e+120) tmp = t_3; else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
t_2 = -4.0 * (t * a);
t_3 = t_2 - (27.0 * (j * k));
tmp = 0.0;
if (x <= -4.8e-21)
tmp = t_1;
elseif (x <= -2e-155)
tmp = t_3;
elseif (x <= 7.8e-292)
tmp = (b * c) + t_2;
elseif (x <= 3.7e+120)
tmp = t_3;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e-21], t$95$1, If[LessEqual[x, -2e-155], t$95$3, If[LessEqual[x, 7.8e-292], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[x, 3.7e+120], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
t_3 := t_2 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-155}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-292}:\\
\;\;\;\;b \cdot c + t_2\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+120}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -4.7999999999999999e-21 or 3.70000000000000024e120 < x Initial program 74.5%
sub-neg74.5%
associate-+l-74.5%
sub-neg74.5%
sub-neg74.5%
distribute-rgt-out--78.0%
associate-*l*81.4%
distribute-lft-neg-in81.4%
cancel-sign-sub81.4%
associate-*l*81.4%
associate-*l*81.4%
Simplified81.4%
Taylor expanded in x around inf 76.8%
if -4.7999999999999999e-21 < x < -2.00000000000000003e-155 or 7.8e-292 < x < 3.70000000000000024e120Initial program 91.6%
sub-neg91.6%
associate-+l-91.6%
sub-neg91.6%
sub-neg91.6%
distribute-rgt-out--91.6%
associate-*l*89.7%
distribute-lft-neg-in89.7%
cancel-sign-sub89.7%
associate-*l*89.7%
associate-*l*89.7%
Simplified89.7%
Taylor expanded in x around 0 73.1%
Taylor expanded in c around 0 60.1%
if -2.00000000000000003e-155 < x < 7.8e-292Initial program 97.1%
sub-neg97.1%
+-commutative97.1%
associate-*l*97.1%
distribute-rgt-neg-in97.1%
fma-def99.8%
*-commutative99.8%
distribute-rgt-neg-in99.8%
metadata-eval99.8%
sub-neg99.8%
+-commutative99.8%
associate-*l*97.3%
distribute-rgt-neg-in97.3%
Simplified84.3%
Taylor expanded in y around 0 92.1%
fma-def92.2%
distribute-lft-out92.2%
*-commutative92.2%
Simplified92.2%
Taylor expanded in j around 0 77.6%
Taylor expanded in i around 0 76.9%
*-commutative76.9%
Simplified76.9%
Final simplification69.8%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))))
(if (<= x -6e+97)
t_1
(if (<= x 7.5e-293)
(+ (* b c) (* -4.0 (+ (* t a) (* x i))))
(if (<= x 3.7e+120) (- (* -4.0 (* t a)) (* 27.0 (* j k))) t_1)))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double tmp;
if (x <= -6e+97) {
tmp = t_1;
} else if (x <= 7.5e-293) {
tmp = (b * c) + (-4.0 * ((t * a) + (x * i)));
} else if (x <= 3.7e+120) {
tmp = (-4.0 * (t * a)) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
if (x <= (-6d+97)) then
tmp = t_1
else if (x <= 7.5d-293) then
tmp = (b * c) + ((-4.0d0) * ((t * a) + (x * i)))
else if (x <= 3.7d+120) then
tmp = ((-4.0d0) * (t * a)) - (27.0d0 * (j * k))
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double tmp;
if (x <= -6e+97) {
tmp = t_1;
} else if (x <= 7.5e-293) {
tmp = (b * c) + (-4.0 * ((t * a) + (x * i)));
} else if (x <= 3.7e+120) {
tmp = (-4.0 * (t * a)) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i)) tmp = 0 if x <= -6e+97: tmp = t_1 elif x <= 7.5e-293: tmp = (b * c) + (-4.0 * ((t * a) + (x * i))) elif x <= 3.7e+120: tmp = (-4.0 * (t * a)) - (27.0 * (j * k)) else: tmp = t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -6e+97) tmp = t_1; elseif (x <= 7.5e-293) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))); elseif (x <= 3.7e+120) tmp = Float64(Float64(-4.0 * Float64(t * a)) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
tmp = 0.0;
if (x <= -6e+97)
tmp = t_1;
elseif (x <= 7.5e-293)
tmp = (b * c) + (-4.0 * ((t * a) + (x * i)));
elseif (x <= 3.7e+120)
tmp = (-4.0 * (t * a)) - (27.0 * (j * k));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6e+97], t$95$1, If[LessEqual[x, 7.5e-293], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.7e+120], N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+97}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{-293}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+120}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -5.9999999999999997e97 or 3.70000000000000024e120 < x Initial program 69.8%
sub-neg69.8%
associate-+l-69.8%
sub-neg69.8%
sub-neg69.8%
distribute-rgt-out--74.3%
associate-*l*78.7%
distribute-lft-neg-in78.7%
cancel-sign-sub78.7%
associate-*l*78.7%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in x around inf 82.7%
if -5.9999999999999997e97 < x < 7.50000000000000038e-293Initial program 95.3%
sub-neg95.3%
+-commutative95.3%
associate-*l*95.4%
distribute-rgt-neg-in95.4%
fma-def97.7%
*-commutative97.7%
distribute-rgt-neg-in97.7%
metadata-eval97.7%
sub-neg97.7%
+-commutative97.7%
associate-*l*96.6%
distribute-rgt-neg-in96.6%
Simplified90.0%
Taylor expanded in y around 0 86.6%
fma-def86.6%
distribute-lft-out86.6%
*-commutative86.6%
Simplified86.6%
Taylor expanded in j around 0 68.2%
if 7.50000000000000038e-293 < x < 3.70000000000000024e120Initial program 90.1%
sub-neg90.1%
associate-+l-90.1%
sub-neg90.1%
sub-neg90.1%
distribute-rgt-out--90.1%
associate-*l*90.0%
distribute-lft-neg-in90.0%
cancel-sign-sub90.0%
associate-*l*90.0%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in x around 0 72.8%
Taylor expanded in c around 0 59.3%
Final simplification70.4%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))))
(if (<= x -6.7e-18)
(+ t_1 (* b c))
(if (<= x 3.9e+120)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
t_1))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double tmp;
if (x <= -6.7e-18) {
tmp = t_1 + (b * c);
} else if (x <= 3.9e+120) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
if (x <= (-6.7d-18)) then
tmp = t_1 + (b * c)
else if (x <= 3.9d+120) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = t_1
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
double tmp;
if (x <= -6.7e-18) {
tmp = t_1 + (b * c);
} else if (x <= 3.9e+120) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i)) tmp = 0 if x <= -6.7e-18: tmp = t_1 + (b * c) elif x <= 3.9e+120: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = t_1 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -6.7e-18) tmp = Float64(t_1 + Float64(b * c)); elseif (x <= 3.9e+120) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * ((18.0 * (y * (z * t))) - (4.0 * i));
tmp = 0.0;
if (x <= -6.7e-18)
tmp = t_1 + (b * c);
elseif (x <= 3.9e+120)
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.7e-18], N[(t$95$1 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.9e+120], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -6.7 \cdot 10^{-18}:\\
\;\;\;\;t_1 + b \cdot c\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+120}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -6.6999999999999998e-18Initial program 81.4%
sub-neg81.4%
associate-+l-81.4%
sub-neg81.4%
sub-neg81.4%
distribute-rgt-out--84.1%
associate-*l*86.6%
distribute-lft-neg-in86.6%
cancel-sign-sub86.6%
associate-*l*86.6%
associate-*l*86.7%
Simplified86.7%
Taylor expanded in j around 0 78.8%
pow178.8%
*-commutative78.8%
Applied egg-rr78.8%
unpow178.8%
*-commutative78.8%
associate-*r*82.8%
Simplified82.8%
Taylor expanded in y around inf 80.4%
*-commutative80.4%
associate-*l*80.4%
*-commutative80.4%
associate-*l*84.4%
Simplified84.4%
Taylor expanded in x around 0 85.6%
if -6.6999999999999998e-18 < x < 3.8999999999999998e120Initial program 93.0%
sub-neg93.0%
associate-+l-93.0%
sub-neg93.0%
sub-neg93.0%
distribute-rgt-out--93.0%
associate-*l*88.3%
distribute-lft-neg-in88.3%
cancel-sign-sub88.3%
associate-*l*87.6%
associate-*l*87.6%
Simplified87.6%
Taylor expanded in x around 0 76.7%
if 3.8999999999999998e120 < x Initial program 60.9%
sub-neg60.9%
associate-+l-60.9%
sub-neg60.9%
sub-neg60.9%
distribute-rgt-out--66.2%
associate-*l*71.3%
distribute-lft-neg-in71.3%
cancel-sign-sub71.3%
associate-*l*71.3%
associate-*l*71.3%
Simplified71.3%
Taylor expanded in x around inf 85.9%
Final simplification80.6%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))) (t_2 (* j (* k -27.0))))
(if (<= j -7.4e+264)
t_2
(if (<= j -2e+257)
t_1
(if (<= j -1.15e+87) t_2 (if (<= j 1.95e-36) t_1 (* k (* j -27.0))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = j * (k * -27.0);
double tmp;
if (j <= -7.4e+264) {
tmp = t_2;
} else if (j <= -2e+257) {
tmp = t_1;
} else if (j <= -1.15e+87) {
tmp = t_2;
} else if (j <= 1.95e-36) {
tmp = t_1;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) + (x * i))
t_2 = j * (k * (-27.0d0))
if (j <= (-7.4d+264)) then
tmp = t_2
else if (j <= (-2d+257)) then
tmp = t_1
else if (j <= (-1.15d+87)) then
tmp = t_2
else if (j <= 1.95d-36) then
tmp = t_1
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = j * (k * -27.0);
double tmp;
if (j <= -7.4e+264) {
tmp = t_2;
} else if (j <= -2e+257) {
tmp = t_1;
} else if (j <= -1.15e+87) {
tmp = t_2;
} else if (j <= 1.95e-36) {
tmp = t_1;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) t_2 = j * (k * -27.0) tmp = 0 if j <= -7.4e+264: tmp = t_2 elif j <= -2e+257: tmp = t_1 elif j <= -1.15e+87: tmp = t_2 elif j <= 1.95e-36: tmp = t_1 else: tmp = k * (j * -27.0) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (j <= -7.4e+264) tmp = t_2; elseif (j <= -2e+257) tmp = t_1; elseif (j <= -1.15e+87) tmp = t_2; elseif (j <= 1.95e-36) tmp = t_1; else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((t * a) + (x * i));
t_2 = j * (k * -27.0);
tmp = 0.0;
if (j <= -7.4e+264)
tmp = t_2;
elseif (j <= -2e+257)
tmp = t_1;
elseif (j <= -1.15e+87)
tmp = t_2;
elseif (j <= 1.95e-36)
tmp = t_1;
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -7.4e+264], t$95$2, If[LessEqual[j, -2e+257], t$95$1, If[LessEqual[j, -1.15e+87], t$95$2, If[LessEqual[j, 1.95e-36], t$95$1, N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -7.4 \cdot 10^{+264}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -2 \cdot 10^{+257}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -1.15 \cdot 10^{+87}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq 1.95 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -7.3999999999999998e264 or -2.00000000000000006e257 < j < -1.1500000000000001e87Initial program 85.2%
sub-neg85.2%
+-commutative85.2%
associate-*l*85.3%
distribute-rgt-neg-in85.3%
fma-def90.3%
*-commutative90.3%
distribute-rgt-neg-in90.3%
metadata-eval90.3%
sub-neg90.3%
+-commutative90.3%
associate-*l*87.9%
distribute-rgt-neg-in87.9%
Simplified85.4%
Taylor expanded in j around inf 46.4%
associate-*r*46.5%
*-commutative46.5%
*-commutative46.5%
*-commutative46.5%
Simplified46.5%
if -7.3999999999999998e264 < j < -2.00000000000000006e257 or -1.1500000000000001e87 < j < 1.95e-36Initial program 84.0%
sub-neg84.0%
+-commutative84.0%
associate-*l*84.0%
distribute-rgt-neg-in84.0%
fma-def84.6%
*-commutative84.6%
distribute-rgt-neg-in84.6%
metadata-eval84.6%
sub-neg84.6%
+-commutative84.6%
associate-*l*84.6%
distribute-rgt-neg-in84.6%
Simplified90.1%
Taylor expanded in y around 0 72.9%
fma-def75.0%
distribute-lft-out75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in j around 0 64.7%
Taylor expanded in c around 0 45.7%
if 1.95e-36 < j Initial program 86.7%
sub-neg86.7%
associate-+l-86.7%
sub-neg86.7%
sub-neg86.7%
distribute-rgt-out--86.7%
associate-*l*83.8%
distribute-lft-neg-in83.8%
cancel-sign-sub83.8%
associate-*l*83.8%
associate-*l*83.8%
Simplified83.8%
fma-def83.8%
fma-neg83.8%
Applied egg-rr83.8%
Taylor expanded in j around inf 33.7%
*-commutative33.7%
associate-*r*33.7%
*-commutative33.7%
*-commutative33.7%
Simplified33.7%
Final simplification42.7%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))) (t_2 (* x (* 18.0 (* z (* y t))))))
(if (<= y -9e+129)
t_2
(if (<= y -3.2e-21)
t_1
(if (<= y -1.5e-54) (* k (* j -27.0)) (if (<= y 550.0) t_1 t_2))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = x * (18.0 * (z * (y * t)));
double tmp;
if (y <= -9e+129) {
tmp = t_2;
} else if (y <= -3.2e-21) {
tmp = t_1;
} else if (y <= -1.5e-54) {
tmp = k * (j * -27.0);
} else if (y <= 550.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-4.0d0) * ((t * a) + (x * i))
t_2 = x * (18.0d0 * (z * (y * t)))
if (y <= (-9d+129)) then
tmp = t_2
else if (y <= (-3.2d-21)) then
tmp = t_1
else if (y <= (-1.5d-54)) then
tmp = k * (j * (-27.0d0))
else if (y <= 550.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double t_2 = x * (18.0 * (z * (y * t)));
double tmp;
if (y <= -9e+129) {
tmp = t_2;
} else if (y <= -3.2e-21) {
tmp = t_1;
} else if (y <= -1.5e-54) {
tmp = k * (j * -27.0);
} else if (y <= 550.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) t_2 = x * (18.0 * (z * (y * t))) tmp = 0 if y <= -9e+129: tmp = t_2 elif y <= -3.2e-21: tmp = t_1 elif y <= -1.5e-54: tmp = k * (j * -27.0) elif y <= 550.0: tmp = t_1 else: tmp = t_2 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) t_2 = Float64(x * Float64(18.0 * Float64(z * Float64(y * t)))) tmp = 0.0 if (y <= -9e+129) tmp = t_2; elseif (y <= -3.2e-21) tmp = t_1; elseif (y <= -1.5e-54) tmp = Float64(k * Float64(j * -27.0)); elseif (y <= 550.0) tmp = t_1; else tmp = t_2; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = -4.0 * ((t * a) + (x * i));
t_2 = x * (18.0 * (z * (y * t)));
tmp = 0.0;
if (y <= -9e+129)
tmp = t_2;
elseif (y <= -3.2e-21)
tmp = t_1;
elseif (y <= -1.5e-54)
tmp = k * (j * -27.0);
elseif (y <= 550.0)
tmp = t_1;
else
tmp = t_2;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+129], t$95$2, If[LessEqual[y, -3.2e-21], t$95$1, If[LessEqual[y, -1.5e-54], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 550.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{+129}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-54}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;y \leq 550:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -9.0000000000000003e129 or 550 < y Initial program 81.5%
sub-neg81.5%
associate-+l-81.5%
sub-neg81.5%
sub-neg81.5%
distribute-rgt-out--85.2%
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 j around 0 81.7%
pow181.7%
*-commutative81.7%
Applied egg-rr81.7%
unpow181.7%
*-commutative81.7%
associate-*r*77.2%
Simplified77.2%
Taylor expanded in x around inf 56.2%
*-commutative56.2%
cancel-sign-sub-inv56.2%
associate-*r*56.3%
metadata-eval56.3%
fma-def56.3%
*-commutative56.3%
*-commutative56.3%
Simplified56.3%
Taylor expanded in y around inf 43.4%
*-commutative43.4%
*-commutative43.4%
associate-*l*47.0%
Simplified47.0%
if -9.0000000000000003e129 < y < -3.2000000000000002e-21 or -1.50000000000000005e-54 < y < 550Initial program 87.3%
sub-neg87.3%
+-commutative87.3%
associate-*l*87.3%
distribute-rgt-neg-in87.3%
fma-def90.8%
*-commutative90.8%
distribute-rgt-neg-in90.8%
metadata-eval90.8%
sub-neg90.8%
+-commutative90.8%
associate-*l*90.2%
distribute-rgt-neg-in90.2%
Simplified91.7%
Taylor expanded in y around 0 83.9%
fma-def85.3%
distribute-lft-out85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in j around 0 63.5%
Taylor expanded in c around 0 43.7%
if -3.2000000000000002e-21 < y < -1.50000000000000005e-54Initial program 88.5%
sub-neg88.5%
associate-+l-88.5%
sub-neg88.5%
sub-neg88.5%
distribute-rgt-out--88.5%
associate-*l*88.5%
distribute-lft-neg-in88.5%
cancel-sign-sub88.5%
associate-*l*88.5%
associate-*l*88.9%
Simplified88.9%
fma-def88.9%
fma-neg88.9%
Applied egg-rr88.9%
Taylor expanded in j around inf 56.2%
*-commutative56.2%
associate-*r*56.2%
*-commutative56.2%
*-commutative56.2%
Simplified56.2%
Final simplification45.5%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= j -2.95e+86) (not (<= j 7.2e-37))) (* -27.0 (* j k)) (* -4.0 (* x i))))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((j <= -2.95e+86) || !(j <= 7.2e-37)) {
tmp = -27.0 * (j * k);
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((j <= (-2.95d+86)) .or. (.not. (j <= 7.2d-37))) then
tmp = (-27.0d0) * (j * k)
else
tmp = (-4.0d0) * (x * i)
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((j <= -2.95e+86) || !(j <= 7.2e-37)) {
tmp = -27.0 * (j * k);
} else {
tmp = -4.0 * (x * i);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (j <= -2.95e+86) or not (j <= 7.2e-37): tmp = -27.0 * (j * k) else: tmp = -4.0 * (x * i) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((j <= -2.95e+86) || !(j <= 7.2e-37)) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(-4.0 * Float64(x * i)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((j <= -2.95e+86) || ~((j <= 7.2e-37)))
tmp = -27.0 * (j * k);
else
tmp = -4.0 * (x * i);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[j, -2.95e+86], N[Not[LessEqual[j, 7.2e-37]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.95 \cdot 10^{+86} \lor \neg \left(j \leq 7.2 \cdot 10^{-37}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if j < -2.9499999999999998e86 or 7.20000000000000014e-37 < j Initial program 84.9%
sub-neg84.9%
+-commutative84.9%
associate-*l*84.9%
distribute-rgt-neg-in84.9%
fma-def92.0%
*-commutative92.0%
distribute-rgt-neg-in92.0%
metadata-eval92.0%
sub-neg92.0%
+-commutative92.0%
associate-*l*91.2%
distribute-rgt-neg-in91.2%
Simplified90.3%
Taylor expanded in j around inf 38.9%
if -2.9499999999999998e86 < j < 7.20000000000000014e-37Initial program 84.9%
sub-neg84.9%
associate-+l-84.9%
sub-neg84.9%
sub-neg84.9%
distribute-rgt-out--87.7%
associate-*l*87.0%
distribute-lft-neg-in87.0%
cancel-sign-sub87.0%
associate-*l*87.0%
associate-*l*87.0%
Simplified87.0%
fma-def87.7%
fma-neg87.7%
Applied egg-rr87.7%
Taylor expanded in i around inf 24.1%
*-commutative24.1%
Simplified24.1%
Final simplification30.5%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= j -3.3e+86) (* j (* k -27.0)) (if (<= j 1.75e-38) (* -4.0 (* x i)) (* -27.0 (* j k)))))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -3.3e+86) {
tmp = j * (k * -27.0);
} else if (j <= 1.75e-38) {
tmp = -4.0 * (x * i);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-3.3d+86)) then
tmp = j * (k * (-27.0d0))
else if (j <= 1.75d-38) then
tmp = (-4.0d0) * (x * i)
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -3.3e+86) {
tmp = j * (k * -27.0);
} else if (j <= 1.75e-38) {
tmp = -4.0 * (x * i);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -3.3e+86: tmp = j * (k * -27.0) elif j <= 1.75e-38: tmp = -4.0 * (x * i) else: tmp = -27.0 * (j * k) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -3.3e+86) tmp = Float64(j * Float64(k * -27.0)); elseif (j <= 1.75e-38) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -3.3e+86)
tmp = j * (k * -27.0);
elseif (j <= 1.75e-38)
tmp = -4.0 * (x * i);
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -3.3e+86], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.75e-38], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -3.3 \cdot 10^{+86}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq 1.75 \cdot 10^{-38}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if j < -3.2999999999999999e86Initial program 82.0%
sub-neg82.0%
+-commutative82.0%
associate-*l*82.1%
distribute-rgt-neg-in82.1%
fma-def88.9%
*-commutative88.9%
distribute-rgt-neg-in88.9%
metadata-eval88.9%
sub-neg88.9%
+-commutative88.9%
associate-*l*86.7%
distribute-rgt-neg-in86.7%
Simplified86.7%
Taylor expanded in j around inf 46.8%
associate-*r*46.9%
*-commutative46.9%
*-commutative46.9%
*-commutative46.9%
Simplified46.9%
if -3.2999999999999999e86 < j < 1.7500000000000001e-38Initial program 84.9%
sub-neg84.9%
associate-+l-84.9%
sub-neg84.9%
sub-neg84.9%
distribute-rgt-out--87.7%
associate-*l*87.0%
distribute-lft-neg-in87.0%
cancel-sign-sub87.0%
associate-*l*87.0%
associate-*l*87.0%
Simplified87.0%
fma-def87.7%
fma-neg87.7%
Applied egg-rr87.7%
Taylor expanded in i around inf 24.1%
*-commutative24.1%
Simplified24.1%
if 1.7500000000000001e-38 < j Initial program 86.7%
sub-neg86.7%
+-commutative86.7%
associate-*l*86.7%
distribute-rgt-neg-in86.7%
fma-def94.1%
*-commutative94.1%
distribute-rgt-neg-in94.1%
metadata-eval94.1%
sub-neg94.1%
+-commutative94.1%
associate-*l*94.1%
distribute-rgt-neg-in94.1%
Simplified92.6%
Taylor expanded in j around inf 33.7%
Final simplification30.5%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= j -8.6e+86) (* j (* k -27.0)) (if (<= j 2.6e-46) (* -4.0 (* x i)) (* k (* j -27.0)))))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -8.6e+86) {
tmp = j * (k * -27.0);
} else if (j <= 2.6e-46) {
tmp = -4.0 * (x * i);
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-8.6d+86)) then
tmp = j * (k * (-27.0d0))
else if (j <= 2.6d-46) then
tmp = (-4.0d0) * (x * i)
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -8.6e+86) {
tmp = j * (k * -27.0);
} else if (j <= 2.6e-46) {
tmp = -4.0 * (x * i);
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -8.6e+86: tmp = j * (k * -27.0) elif j <= 2.6e-46: tmp = -4.0 * (x * i) else: tmp = k * (j * -27.0) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -8.6e+86) tmp = Float64(j * Float64(k * -27.0)); elseif (j <= 2.6e-46) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (j <= -8.6e+86)
tmp = j * (k * -27.0);
elseif (j <= 2.6e-46)
tmp = -4.0 * (x * i);
else
tmp = k * (j * -27.0);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -8.6e+86], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.6e-46], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;j \leq -8.6 \cdot 10^{+86}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;j \leq 2.6 \cdot 10^{-46}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if j < -8.6000000000000004e86Initial program 82.0%
sub-neg82.0%
+-commutative82.0%
associate-*l*82.1%
distribute-rgt-neg-in82.1%
fma-def88.9%
*-commutative88.9%
distribute-rgt-neg-in88.9%
metadata-eval88.9%
sub-neg88.9%
+-commutative88.9%
associate-*l*86.7%
distribute-rgt-neg-in86.7%
Simplified86.7%
Taylor expanded in j around inf 46.8%
associate-*r*46.9%
*-commutative46.9%
*-commutative46.9%
*-commutative46.9%
Simplified46.9%
if -8.6000000000000004e86 < j < 2.6000000000000002e-46Initial program 84.7%
sub-neg84.7%
associate-+l-84.7%
sub-neg84.7%
sub-neg84.7%
distribute-rgt-out--87.5%
associate-*l*86.8%
distribute-lft-neg-in86.8%
cancel-sign-sub86.8%
associate-*l*86.8%
associate-*l*86.8%
Simplified86.8%
fma-def87.5%
fma-neg87.5%
Applied egg-rr87.5%
Taylor expanded in i around inf 24.4%
*-commutative24.4%
Simplified24.4%
if 2.6000000000000002e-46 < j Initial program 87.1%
sub-neg87.1%
associate-+l-87.1%
sub-neg87.1%
sub-neg87.1%
distribute-rgt-out--87.1%
associate-*l*84.3%
distribute-lft-neg-in84.3%
cancel-sign-sub84.3%
associate-*l*84.3%
associate-*l*84.3%
Simplified84.3%
fma-def84.3%
fma-neg84.3%
Applied egg-rr84.3%
Taylor expanded in j around inf 32.8%
*-commutative32.8%
associate-*r*32.9%
*-commutative32.9%
*-commutative32.9%
Simplified32.9%
Final simplification30.6%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (<= k -2.5e-33) (* j (* k -27.0)) (if (<= k 5.3e+101) (* t (* a -4.0)) (* -27.0 (* j k)))))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -2.5e-33) {
tmp = j * (k * -27.0);
} else if (k <= 5.3e+101) {
tmp = t * (a * -4.0);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-2.5d-33)) then
tmp = j * (k * (-27.0d0))
else if (k <= 5.3d+101) then
tmp = t * (a * (-4.0d0))
else
tmp = (-27.0d0) * (j * k)
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -2.5e-33) {
tmp = j * (k * -27.0);
} else if (k <= 5.3e+101) {
tmp = t * (a * -4.0);
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -2.5e-33: tmp = j * (k * -27.0) elif k <= 5.3e+101: tmp = t * (a * -4.0) else: tmp = -27.0 * (j * k) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -2.5e-33) tmp = Float64(j * Float64(k * -27.0)); elseif (k <= 5.3e+101) tmp = Float64(t * Float64(a * -4.0)); else tmp = Float64(-27.0 * Float64(j * k)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if (k <= -2.5e-33)
tmp = j * (k * -27.0);
elseif (k <= 5.3e+101)
tmp = t * (a * -4.0);
else
tmp = -27.0 * (j * k);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -2.5e-33], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 5.3e+101], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.5 \cdot 10^{-33}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 5.3 \cdot 10^{+101}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -2.50000000000000014e-33Initial program 82.6%
sub-neg82.6%
+-commutative82.6%
associate-*l*82.7%
distribute-rgt-neg-in82.7%
fma-def89.9%
*-commutative89.9%
distribute-rgt-neg-in89.9%
metadata-eval89.9%
sub-neg89.9%
+-commutative89.9%
associate-*l*89.9%
distribute-rgt-neg-in89.9%
Simplified94.2%
Taylor expanded in j around inf 39.0%
associate-*r*39.1%
*-commutative39.1%
*-commutative39.1%
*-commutative39.1%
Simplified39.1%
if -2.50000000000000014e-33 < k < 5.30000000000000006e101Initial program 85.2%
sub-neg85.2%
associate-+l-85.2%
sub-neg85.2%
sub-neg85.2%
distribute-rgt-out--86.6%
associate-*l*85.9%
distribute-lft-neg-in85.9%
cancel-sign-sub85.9%
associate-*l*85.2%
associate-*l*85.2%
Simplified85.2%
Taylor expanded in x around 0 57.2%
Taylor expanded in c around 0 36.9%
Taylor expanded in a around inf 28.8%
associate-*r*28.8%
Simplified28.8%
if 5.30000000000000006e101 < k Initial program 87.3%
sub-neg87.3%
+-commutative87.3%
associate-*l*87.3%
distribute-rgt-neg-in87.3%
fma-def93.7%
*-commutative93.7%
distribute-rgt-neg-in93.7%
metadata-eval93.7%
sub-neg93.7%
+-commutative93.7%
associate-*l*93.7%
distribute-rgt-neg-in93.7%
Simplified91.8%
Taylor expanded in j around inf 33.9%
Final simplification32.5%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (* -27.0 (* j k)))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return -27.0 * (j * k);
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (-27.0d0) * (j * k)
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return -27.0 * (j * k);
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): return -27.0 * (j * k)
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(-27.0 * Float64(j * k)) end
y, z = num2cell(sort([y, z])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = -27.0 * (j * k);
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
-27 \cdot \left(j \cdot k\right)
\end{array}
Initial program 84.9%
sub-neg84.9%
+-commutative84.9%
associate-*l*84.9%
distribute-rgt-neg-in84.9%
fma-def88.0%
*-commutative88.0%
distribute-rgt-neg-in88.0%
metadata-eval88.0%
sub-neg88.0%
+-commutative88.0%
associate-*l*87.7%
distribute-rgt-neg-in87.7%
Simplified90.0%
Taylor expanded in j around inf 22.0%
Final simplification22.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023207
(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)))