
(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 20 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 (+ (* i -4.0) (* 18.0 (* y (* z t))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 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 * ((i * -4.0) + (18.0 * (y * (z * t))));
}
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 * ((i * -4.0) + (18.0 * (y * (z * t))));
}
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 * ((i * -4.0) + (18.0 * (y * (z * t)))) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(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(i * -4.0) + Float64(18.0 * Float64(y * Float64(z * t))))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = (((((((x * 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 * ((i * -4.0) + (18.0 * (y * (z * t))));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(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[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $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(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 96.5%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
associate--l-0.0%
associate-+l-0.0%
associate--l-0.0%
*-commutative0.0%
associate-*r*11.5%
associate-*l*26.9%
associate-*r*23.1%
*-commutative23.1%
associate-*l*15.4%
associate--l-15.4%
associate-+l-15.4%
Simplified26.9%
Taylor expanded in x around inf 69.3%
cancel-sign-sub-inv69.3%
+-commutative69.3%
metadata-eval69.3%
*-commutative69.3%
*-commutative69.3%
associate-*l*69.3%
*-commutative69.3%
Applied egg-rr69.3%
Final simplification93.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
(if (<= t -5e-174)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* j (* 27.0 k)) (* x (* 4.0 i))))
(if (<= t 8.4e+93)
(-
(-
(+ (* b c) (- (* (* z t) (* x (* 18.0 y))) (* t (* a 4.0))))
(* (* x 4.0) i))
(* (* j 27.0) k))
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 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 (t <= -5e-174) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
} else if (t <= 8.4e+93) {
tmp = (((b * c) + (((z * t) * (x * (18.0 * y))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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 (t <= (-5d-174)) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((j * (27.0d0 * k)) + (x * (4.0d0 * i)))
else if (t <= 8.4d+93) then
tmp = (((b * c) + (((z * t) * (x * (18.0d0 * y))) - (t * (a * 4.0d0)))) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
end if
code = tmp
end function
assert 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 <= -5e-174) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
} else if (t <= 8.4e+93) {
tmp = (((b * c) + (((z * t) * (x * (18.0 * y))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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 t <= -5e-174: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i))) elif t <= 8.4e+93: tmp = (((b * c) + (((z * t) * (x * (18.0 * y))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k) else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (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 (t <= -5e-174) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(j * Float64(27.0 * k)) + Float64(x * Float64(4.0 * i)))); elseif (t <= 8.4e+93) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(Float64(Float64(z * t) * Float64(x * Float64(18.0 * y))) - Float64(t * Float64(a * 4.0)))) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); end return tmp end
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 <= -5e-174)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
elseif (t <= 8.4e+93)
tmp = (((b * c) + (((z * t) * (x * (18.0 * y))) - (t * (a * 4.0)))) - ((x * 4.0) * i)) - ((j * 27.0) * k);
else
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
end
tmp_2 = tmp;
end
NOTE: 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, -5e-174], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.4e+93], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(N[(N[(z * t), $MachinePrecision] * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-174}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\right)\\
\mathbf{elif}\;t \leq 8.4 \cdot 10^{+93}:\\
\;\;\;\;\left(\left(b \cdot c + \left(\left(z \cdot t\right) \cdot \left(x \cdot \left(18 \cdot y\right)\right) - t \cdot \left(a \cdot 4\right)\right)\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if t < -5.0000000000000002e-174Initial program 92.1%
associate--l-92.1%
associate-+l-92.1%
associate--l-92.1%
*-commutative92.1%
associate-*r*89.3%
associate-*l*87.4%
associate-*r*86.5%
*-commutative86.5%
associate-*l*91.9%
associate--l-91.9%
associate-+l-91.9%
Simplified93.2%
if -5.0000000000000002e-174 < t < 8.39999999999999921e93Initial program 84.7%
add-exp-log_binary6456.7%
Applied rewrite-once56.7%
rem-exp-log84.7%
associate-*l*89.2%
associate-*r*89.2%
*-commutative89.2%
Simplified89.2%
if 8.39999999999999921e93 < t Initial program 79.0%
associate--l-79.0%
associate-+l-79.0%
associate--l-79.0%
*-commutative79.0%
associate-*r*76.8%
associate-*l*76.9%
associate-*r*76.7%
*-commutative76.7%
associate-*l*76.7%
associate--l-76.7%
associate-+l-76.7%
Simplified86.0%
Taylor expanded in j around 0 93.3%
Final simplification91.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 (<= (* b c) 1.12e+285)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* j (* 27.0 k)) (* x (* 4.0 i))))
(+ (* b c) (* j (* k -27.0)))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 1.12e+285) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= 1.12d+285) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((j * (27.0d0 * k)) + (x * (4.0d0 * i)))
else
tmp = (b * c) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= 1.12e+285) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= 1.12e+285: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i))) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= 1.12e+285) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(j * Float64(27.0 * k)) + Float64(x * Float64(4.0 * i)))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= 1.12e+285)
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
else
tmp = (b * c) + (j * (k * -27.0));
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], 1.12e+285], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq 1.12 \cdot 10^{+285}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < 1.11999999999999998e285Initial program 88.3%
associate--l-88.3%
associate-+l-88.3%
associate--l-88.3%
*-commutative88.3%
associate-*r*88.8%
associate-*l*89.6%
associate-*r*87.6%
*-commutative87.6%
associate-*l*88.3%
associate--l-88.3%
associate-+l-88.3%
Simplified90.9%
if 1.11999999999999998e285 < (*.f64 b c) Initial program 62.5%
Simplified68.8%
Taylor expanded in b around inf 93.8%
Final simplification91.1%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* -4.0 (* x i)))
(t_3 (+ t_1 t_2))
(t_4 (+ (* -4.0 (* t a)) (+ (* b c) t_2)))
(t_5 (* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))))
(if (<= t -1.92e+27)
t_5
(if (<= t -7.5e-106)
(+ (* b c) t_1)
(if (<= t -3.7e-190)
t_4
(if (<= t 4.8e-211)
t_3
(if (<= t 6.2e-20)
t_4
(if (<= t 1.25e+39)
t_3
(if (<= t 1.65e+184)
(* x (+ (* i -4.0) (* 18.0 (* y (* z t)))))
t_5)))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (x * i);
double t_3 = t_1 + t_2;
double t_4 = (-4.0 * (t * a)) + ((b * c) + t_2);
double t_5 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -1.92e+27) {
tmp = t_5;
} else if (t <= -7.5e-106) {
tmp = (b * c) + t_1;
} else if (t <= -3.7e-190) {
tmp = t_4;
} else if (t <= 4.8e-211) {
tmp = t_3;
} else if (t <= 6.2e-20) {
tmp = t_4;
} else if (t <= 1.25e+39) {
tmp = t_3;
} else if (t <= 1.65e+184) {
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
} else {
tmp = t_5;
}
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) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (-4.0d0) * (x * i)
t_3 = t_1 + t_2
t_4 = ((-4.0d0) * (t * a)) + ((b * c) + t_2)
t_5 = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
if (t <= (-1.92d+27)) then
tmp = t_5
else if (t <= (-7.5d-106)) then
tmp = (b * c) + t_1
else if (t <= (-3.7d-190)) then
tmp = t_4
else if (t <= 4.8d-211) then
tmp = t_3
else if (t <= 6.2d-20) then
tmp = t_4
else if (t <= 1.25d+39) then
tmp = t_3
else if (t <= 1.65d+184) then
tmp = x * ((i * (-4.0d0)) + (18.0d0 * (y * (z * t))))
else
tmp = t_5
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (x * i);
double t_3 = t_1 + t_2;
double t_4 = (-4.0 * (t * a)) + ((b * c) + t_2);
double t_5 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -1.92e+27) {
tmp = t_5;
} else if (t <= -7.5e-106) {
tmp = (b * c) + t_1;
} else if (t <= -3.7e-190) {
tmp = t_4;
} else if (t <= 4.8e-211) {
tmp = t_3;
} else if (t <= 6.2e-20) {
tmp = t_4;
} else if (t <= 1.25e+39) {
tmp = t_3;
} else if (t <= 1.65e+184) {
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
} else {
tmp = t_5;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = -4.0 * (x * i) t_3 = t_1 + t_2 t_4 = (-4.0 * (t * a)) + ((b * c) + t_2) t_5 = t * (((x * 18.0) * (y * z)) + (a * -4.0)) tmp = 0 if t <= -1.92e+27: tmp = t_5 elif t <= -7.5e-106: tmp = (b * c) + t_1 elif t <= -3.7e-190: tmp = t_4 elif t <= 4.8e-211: tmp = t_3 elif t <= 6.2e-20: tmp = t_4 elif t <= 1.25e+39: tmp = t_3 elif t <= 1.65e+184: tmp = x * ((i * -4.0) + (18.0 * (y * (z * t)))) else: tmp = t_5 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(-4.0 * Float64(x * i)) t_3 = Float64(t_1 + t_2) t_4 = Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(b * c) + t_2)) t_5 = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))) tmp = 0.0 if (t <= -1.92e+27) tmp = t_5; elseif (t <= -7.5e-106) tmp = Float64(Float64(b * c) + t_1); elseif (t <= -3.7e-190) tmp = t_4; elseif (t <= 4.8e-211) tmp = t_3; elseif (t <= 6.2e-20) tmp = t_4; elseif (t <= 1.25e+39) tmp = t_3; elseif (t <= 1.65e+184) tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(y * Float64(z * t))))); else tmp = t_5; end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = j * (k * -27.0);
t_2 = -4.0 * (x * i);
t_3 = t_1 + t_2;
t_4 = (-4.0 * (t * a)) + ((b * c) + t_2);
t_5 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
tmp = 0.0;
if (t <= -1.92e+27)
tmp = t_5;
elseif (t <= -7.5e-106)
tmp = (b * c) + t_1;
elseif (t <= -3.7e-190)
tmp = t_4;
elseif (t <= 4.8e-211)
tmp = t_3;
elseif (t <= 6.2e-20)
tmp = t_4;
elseif (t <= 1.25e+39)
tmp = t_3;
elseif (t <= 1.65e+184)
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
else
tmp = t_5;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.92e+27], t$95$5, If[LessEqual[t, -7.5e-106], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, -3.7e-190], t$95$4, If[LessEqual[t, 4.8e-211], t$95$3, If[LessEqual[t, 6.2e-20], t$95$4, If[LessEqual[t, 1.25e+39], t$95$3, If[LessEqual[t, 1.65e+184], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$5]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(x \cdot i\right)\\
t_3 := t_1 + t_2\\
t_4 := -4 \cdot \left(t \cdot a\right) + \left(b \cdot c + t_2\right)\\
t_5 := t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -1.92 \cdot 10^{+27}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-106}:\\
\;\;\;\;b \cdot c + t_1\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{-190}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-211}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-20}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+39}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+184}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_5\\
\end{array}
\end{array}
if t < -1.92000000000000004e27 or 1.6499999999999999e184 < t Initial program 85.1%
add-exp-log_binary6443.8%
Applied rewrite-once43.8%
rem-exp-log85.1%
associate-*l*77.4%
associate-*r*77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in t around inf 79.7%
cancel-sign-sub-inv79.7%
associate-*r*79.7%
metadata-eval79.7%
*-commutative79.7%
Simplified79.7%
if -1.92000000000000004e27 < t < -7.5000000000000002e-106Initial program 99.6%
Simplified99.7%
Taylor expanded in b around inf 62.1%
if -7.5000000000000002e-106 < t < -3.7000000000000002e-190 or 4.8000000000000004e-211 < t < 6.19999999999999999e-20Initial program 85.7%
Simplified90.5%
Taylor expanded in x around 0 90.6%
Taylor expanded in j around 0 79.2%
if -3.7000000000000002e-190 < t < 4.8000000000000004e-211 or 6.19999999999999999e-20 < t < 1.25000000000000004e39Initial program 79.7%
Simplified81.5%
Taylor expanded in i around inf 77.3%
if 1.25000000000000004e39 < t < 1.6499999999999999e184Initial program 96.0%
associate--l-96.0%
associate-+l-96.0%
associate--l-96.0%
*-commutative96.0%
associate-*r*92.4%
associate-*l*92.5%
associate-*r*92.3%
*-commutative92.3%
associate-*l*92.2%
associate--l-92.2%
associate-+l-92.2%
Simplified96.1%
Taylor expanded in x around inf 69.8%
cancel-sign-sub-inv69.8%
+-commutative69.8%
metadata-eval69.8%
*-commutative69.8%
*-commutative69.8%
associate-*l*69.8%
*-commutative69.8%
Applied egg-rr69.8%
Final simplification76.3%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i)))
(t_2 (+ (* -4.0 (* t a)) (+ (* b c) t_1)))
(t_3 (* t (+ (* (* x 18.0) (* y z)) (* a -4.0))))
(t_4 (* j (* k -27.0)))
(t_5 (+ t_4 t_1)))
(if (<= t -1.8e+30)
t_3
(if (<= t -2.7e-103)
(+ t_4 (* 18.0 (* (* y z) (* x t))))
(if (<= t -1.15e-189)
t_2
(if (<= t 4e-210)
t_5
(if (<= t 4.7e-19)
t_2
(if (<= t 7.6e+39)
t_5
(if (<= t 4.6e+184)
(* x (+ (* i -4.0) (* 18.0 (* y (* z t)))))
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 = -4.0 * (x * i);
double t_2 = (-4.0 * (t * a)) + ((b * c) + t_1);
double t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double t_4 = j * (k * -27.0);
double t_5 = t_4 + t_1;
double tmp;
if (t <= -1.8e+30) {
tmp = t_3;
} else if (t <= -2.7e-103) {
tmp = t_4 + (18.0 * ((y * z) * (x * t)));
} else if (t <= -1.15e-189) {
tmp = t_2;
} else if (t <= 4e-210) {
tmp = t_5;
} else if (t <= 4.7e-19) {
tmp = t_2;
} else if (t <= 7.6e+39) {
tmp = t_5;
} else if (t <= 4.6e+184) {
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
} 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) :: t_4
real(8) :: t_5
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
t_2 = ((-4.0d0) * (t * a)) + ((b * c) + t_1)
t_3 = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
t_4 = j * (k * (-27.0d0))
t_5 = t_4 + t_1
if (t <= (-1.8d+30)) then
tmp = t_3
else if (t <= (-2.7d-103)) then
tmp = t_4 + (18.0d0 * ((y * z) * (x * t)))
else if (t <= (-1.15d-189)) then
tmp = t_2
else if (t <= 4d-210) then
tmp = t_5
else if (t <= 4.7d-19) then
tmp = t_2
else if (t <= 7.6d+39) then
tmp = t_5
else if (t <= 4.6d+184) then
tmp = x * ((i * (-4.0d0)) + (18.0d0 * (y * (z * t))))
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 = -4.0 * (x * i);
double t_2 = (-4.0 * (t * a)) + ((b * c) + t_1);
double t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double t_4 = j * (k * -27.0);
double t_5 = t_4 + t_1;
double tmp;
if (t <= -1.8e+30) {
tmp = t_3;
} else if (t <= -2.7e-103) {
tmp = t_4 + (18.0 * ((y * z) * (x * t)));
} else if (t <= -1.15e-189) {
tmp = t_2;
} else if (t <= 4e-210) {
tmp = t_5;
} else if (t <= 4.7e-19) {
tmp = t_2;
} else if (t <= 7.6e+39) {
tmp = t_5;
} else if (t <= 4.6e+184) {
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
} 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 = -4.0 * (x * i) t_2 = (-4.0 * (t * a)) + ((b * c) + t_1) t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0)) t_4 = j * (k * -27.0) t_5 = t_4 + t_1 tmp = 0 if t <= -1.8e+30: tmp = t_3 elif t <= -2.7e-103: tmp = t_4 + (18.0 * ((y * z) * (x * t))) elif t <= -1.15e-189: tmp = t_2 elif t <= 4e-210: tmp = t_5 elif t <= 4.7e-19: tmp = t_2 elif t <= 7.6e+39: tmp = t_5 elif t <= 4.6e+184: tmp = x * ((i * -4.0) + (18.0 * (y * (z * t)))) 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(-4.0 * Float64(x * i)) t_2 = Float64(Float64(-4.0 * Float64(t * a)) + Float64(Float64(b * c) + t_1)) t_3 = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))) t_4 = Float64(j * Float64(k * -27.0)) t_5 = Float64(t_4 + t_1) tmp = 0.0 if (t <= -1.8e+30) tmp = t_3; elseif (t <= -2.7e-103) tmp = Float64(t_4 + Float64(18.0 * Float64(Float64(y * z) * Float64(x * t)))); elseif (t <= -1.15e-189) tmp = t_2; elseif (t <= 4e-210) tmp = t_5; elseif (t <= 4.7e-19) tmp = t_2; elseif (t <= 7.6e+39) tmp = t_5; elseif (t <= 4.6e+184) tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(y * Float64(z * t))))); 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 = -4.0 * (x * i);
t_2 = (-4.0 * (t * a)) + ((b * c) + t_1);
t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
t_4 = j * (k * -27.0);
t_5 = t_4 + t_1;
tmp = 0.0;
if (t <= -1.8e+30)
tmp = t_3;
elseif (t <= -2.7e-103)
tmp = t_4 + (18.0 * ((y * z) * (x * t)));
elseif (t <= -1.15e-189)
tmp = t_2;
elseif (t <= 4e-210)
tmp = t_5;
elseif (t <= 4.7e-19)
tmp = t_2;
elseif (t <= 7.6e+39)
tmp = t_5;
elseif (t <= 4.6e+184)
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 + t$95$1), $MachinePrecision]}, If[LessEqual[t, -1.8e+30], t$95$3, If[LessEqual[t, -2.7e-103], N[(t$95$4 + N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.15e-189], t$95$2, If[LessEqual[t, 4e-210], t$95$5, If[LessEqual[t, 4.7e-19], t$95$2, If[LessEqual[t, 7.6e+39], t$95$5, If[LessEqual[t, 4.6e+184], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
t_2 := -4 \cdot \left(t \cdot a\right) + \left(b \cdot c + t_1\right)\\
t_3 := t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
t_4 := j \cdot \left(k \cdot -27\right)\\
t_5 := t_4 + t_1\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+30}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-103}:\\
\;\;\;\;t_4 + 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-189}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-210}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-19}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{+39}:\\
\;\;\;\;t_5\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+184}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -1.8000000000000001e30 or 4.6e184 < t Initial program 84.7%
add-exp-log_binary6443.7%
Applied rewrite-once43.7%
rem-exp-log84.7%
associate-*l*76.9%
associate-*r*76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in t around inf 80.3%
cancel-sign-sub-inv80.3%
associate-*r*80.3%
metadata-eval80.3%
*-commutative80.3%
Simplified80.3%
if -1.8000000000000001e30 < t < -2.7000000000000001e-103Initial program 99.7%
Simplified99.7%
Taylor expanded in y around inf 64.8%
associate-*r*68.1%
Simplified68.1%
if -2.7000000000000001e-103 < t < -1.1499999999999999e-189 or 4.0000000000000002e-210 < t < 4.7e-19Initial program 85.7%
Simplified90.5%
Taylor expanded in x around 0 90.6%
Taylor expanded in j around 0 79.2%
if -1.1499999999999999e-189 < t < 4.0000000000000002e-210 or 4.7e-19 < t < 7.5999999999999996e39Initial program 79.7%
Simplified81.5%
Taylor expanded in i around inf 77.3%
if 7.5999999999999996e39 < t < 4.6e184Initial program 96.0%
associate--l-96.0%
associate-+l-96.0%
associate--l-96.0%
*-commutative96.0%
associate-*r*92.4%
associate-*l*92.5%
associate-*r*92.3%
*-commutative92.3%
associate-*l*92.2%
associate--l-92.2%
associate-+l-92.2%
Simplified96.1%
Taylor expanded in x around inf 69.8%
cancel-sign-sub-inv69.8%
+-commutative69.8%
metadata-eval69.8%
*-commutative69.8%
*-commutative69.8%
associate-*l*69.8%
*-commutative69.8%
Applied egg-rr69.8%
Final simplification77.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 (* x (* y z)))) (t_2 (* 4.0 (* x i))))
(if (<= t -3.6e+45)
(+ (* j (* k -27.0)) (* t (+ t_1 (* a -4.0))))
(if (<= t 8.6e+38)
(- (+ (* b c) (* -4.0 (* t a))) (+ t_2 (* 27.0 (* j k))))
(- (+ (* b c) (* t (- t_1 (* a 4.0)))) t_2)))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double tmp;
if (t <= -3.6e+45) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
} else if (t <= 8.6e+38) {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
} else {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 18.0d0 * (x * (y * z))
t_2 = 4.0d0 * (x * i)
if (t <= (-3.6d+45)) then
tmp = (j * (k * (-27.0d0))) + (t * (t_1 + (a * (-4.0d0))))
else if (t <= 8.6d+38) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (t_2 + (27.0d0 * (j * k)))
else
tmp = ((b * c) + (t * (t_1 - (a * 4.0d0)))) - t_2
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 18.0 * (x * (y * z));
double t_2 = 4.0 * (x * i);
double tmp;
if (t <= -3.6e+45) {
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
} else if (t <= 8.6e+38) {
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
} else {
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = 18.0 * (x * (y * z)) t_2 = 4.0 * (x * i) tmp = 0 if t <= -3.6e+45: tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0))) elif t <= 8.6e+38: tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k))) else: tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2 return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(x * Float64(y * z))) t_2 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t <= -3.6e+45) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(t_1 + Float64(a * -4.0)))); elseif (t <= 8.6e+38) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(t_2 + Float64(27.0 * Float64(j * k)))); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(t_1 - Float64(a * 4.0)))) - t_2); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = 18.0 * (x * (y * z));
t_2 = 4.0 * (x * i);
tmp = 0.0;
if (t <= -3.6e+45)
tmp = (j * (k * -27.0)) + (t * (t_1 + (a * -4.0)));
elseif (t <= 8.6e+38)
tmp = ((b * c) + (-4.0 * (t * a))) - (t_2 + (27.0 * (j * k)));
else
tmp = ((b * c) + (t * (t_1 - (a * 4.0)))) - t_2;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.6e+45], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.6e+38], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(t$95$1 - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+45}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(t_1 + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{+38}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(t_2 + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(t_1 - a \cdot 4\right)\right) - t_2\\
\end{array}
\end{array}
if t < -3.6e45Initial program 92.6%
Simplified91.1%
Taylor expanded in t around inf 89.2%
if -3.6e45 < t < 8.5999999999999994e38Initial program 85.8%
associate--l-85.8%
associate-+l-85.8%
associate--l-85.8%
*-commutative85.8%
associate-*r*91.1%
associate-*l*95.1%
associate-*r*91.2%
*-commutative91.2%
associate-*l*87.2%
associate--l-87.2%
associate-+l-87.2%
Simplified88.5%
Taylor expanded in y around 0 88.1%
if 8.5999999999999994e38 < t Initial program 82.9%
associate--l-82.9%
associate-+l-82.9%
associate--l-82.9%
*-commutative82.9%
associate-*r*81.2%
associate-*l*81.2%
associate-*r*81.1%
*-commutative81.1%
associate-*l*81.1%
associate--l-81.1%
associate-+l-81.1%
Simplified88.6%
Taylor expanded in j around 0 92.8%
Final simplification89.3%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* (* y z) (* x t)))))
(if (<= t -2.95e+26)
t_2
(if (<= t -5.5e-106)
(* -27.0 (* j k))
(if (<= t -4.5e-198)
t_1
(if (<= t 6.8e-211)
(* j (* k -27.0))
(if (<= t 1.8e-112)
(* b c)
(if (<= t 2.6e+121)
t_1
(if (or (<= t 2.6e+281) (not (<= t 6.2e+294)))
t_2
(* t (* a -4.0)))))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double t_2 = 18.0 * ((y * z) * (x * t));
double tmp;
if (t <= -2.95e+26) {
tmp = t_2;
} else if (t <= -5.5e-106) {
tmp = -27.0 * (j * k);
} else if (t <= -4.5e-198) {
tmp = t_1;
} else if (t <= 6.8e-211) {
tmp = j * (k * -27.0);
} else if (t <= 1.8e-112) {
tmp = b * c;
} else if (t <= 2.6e+121) {
tmp = t_1;
} else if ((t <= 2.6e+281) || !(t <= 6.2e+294)) {
tmp = t_2;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * (i * (-4.0d0))
t_2 = 18.0d0 * ((y * z) * (x * t))
if (t <= (-2.95d+26)) then
tmp = t_2
else if (t <= (-5.5d-106)) then
tmp = (-27.0d0) * (j * k)
else if (t <= (-4.5d-198)) then
tmp = t_1
else if (t <= 6.8d-211) then
tmp = j * (k * (-27.0d0))
else if (t <= 1.8d-112) then
tmp = b * c
else if (t <= 2.6d+121) then
tmp = t_1
else if ((t <= 2.6d+281) .or. (.not. (t <= 6.2d+294))) then
tmp = t_2
else
tmp = t * (a * (-4.0d0))
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double t_2 = 18.0 * ((y * z) * (x * t));
double tmp;
if (t <= -2.95e+26) {
tmp = t_2;
} else if (t <= -5.5e-106) {
tmp = -27.0 * (j * k);
} else if (t <= -4.5e-198) {
tmp = t_1;
} else if (t <= 6.8e-211) {
tmp = j * (k * -27.0);
} else if (t <= 1.8e-112) {
tmp = b * c;
} else if (t <= 2.6e+121) {
tmp = t_1;
} else if ((t <= 2.6e+281) || !(t <= 6.2e+294)) {
tmp = t_2;
} else {
tmp = t * (a * -4.0);
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) t_2 = 18.0 * ((y * z) * (x * t)) tmp = 0 if t <= -2.95e+26: tmp = t_2 elif t <= -5.5e-106: tmp = -27.0 * (j * k) elif t <= -4.5e-198: tmp = t_1 elif t <= 6.8e-211: tmp = j * (k * -27.0) elif t <= 1.8e-112: tmp = b * c elif t <= 2.6e+121: tmp = t_1 elif (t <= 2.6e+281) or not (t <= 6.2e+294): tmp = t_2 else: tmp = t * (a * -4.0) return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) t_2 = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) tmp = 0.0 if (t <= -2.95e+26) tmp = t_2; elseif (t <= -5.5e-106) tmp = Float64(-27.0 * Float64(j * k)); elseif (t <= -4.5e-198) tmp = t_1; elseif (t <= 6.8e-211) tmp = Float64(j * Float64(k * -27.0)); elseif (t <= 1.8e-112) tmp = Float64(b * c); elseif (t <= 2.6e+121) tmp = t_1; elseif ((t <= 2.6e+281) || !(t <= 6.2e+294)) tmp = t_2; else tmp = Float64(t * Float64(a * -4.0)); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
t_1 = x * (i * -4.0);
t_2 = 18.0 * ((y * z) * (x * t));
tmp = 0.0;
if (t <= -2.95e+26)
tmp = t_2;
elseif (t <= -5.5e-106)
tmp = -27.0 * (j * k);
elseif (t <= -4.5e-198)
tmp = t_1;
elseif (t <= 6.8e-211)
tmp = j * (k * -27.0);
elseif (t <= 1.8e-112)
tmp = b * c;
elseif (t <= 2.6e+121)
tmp = t_1;
elseif ((t <= 2.6e+281) || ~((t <= 6.2e+294)))
tmp = t_2;
else
tmp = t * (a * -4.0);
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.95e+26], t$95$2, If[LessEqual[t, -5.5e-106], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.5e-198], t$95$1, If[LessEqual[t, 6.8e-211], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-112], N[(b * c), $MachinePrecision], If[LessEqual[t, 2.6e+121], t$95$1, If[Or[LessEqual[t, 2.6e+281], N[Not[LessEqual[t, 6.2e+294]], $MachinePrecision]], t$95$2, N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{if}\;t \leq -2.95 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-106}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-211}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-112}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+121}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+281} \lor \neg \left(t \leq 6.2 \cdot 10^{+294}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\end{array}
\end{array}
if t < -2.95000000000000015e26 or 2.5999999999999999e121 < t < 2.6000000000000001e281 or 6.20000000000000038e294 < t Initial program 86.1%
associate--l-86.1%
associate-+l-86.1%
associate--l-86.1%
*-commutative86.1%
associate-*r*80.2%
associate-*l*77.2%
associate-*r*80.2%
*-commutative80.2%
associate-*l*86.0%
associate--l-86.0%
associate-+l-86.0%
Simplified89.5%
Taylor expanded in x around inf 64.1%
Taylor expanded in t around inf 58.9%
Taylor expanded in x around 0 58.9%
associate-*r*59.0%
Simplified59.0%
Taylor expanded in t around 0 58.9%
associate-*r*58.9%
*-commutative58.9%
*-commutative58.9%
Simplified58.9%
if -2.95000000000000015e26 < t < -5.5000000000000001e-106Initial program 99.6%
Simplified99.7%
Taylor expanded in j around inf 42.9%
if -5.5000000000000001e-106 < t < -4.4999999999999998e-198 or 1.8e-112 < t < 2.5999999999999999e121Initial program 84.6%
associate--l-84.6%
associate-+l-84.6%
associate--l-84.6%
*-commutative84.6%
associate-*r*88.3%
associate-*l*92.0%
associate-*r*86.0%
*-commutative86.0%
associate-*l*84.7%
associate--l-84.7%
associate-+l-84.7%
Simplified89.8%
Taylor expanded in x around inf 49.9%
Taylor expanded in t around 0 42.5%
*-commutative42.5%
Simplified42.5%
if -4.4999999999999998e-198 < t < 6.8000000000000002e-211Initial program 78.8%
add-exp-log_binary6460.7%
Applied rewrite-once60.7%
rem-exp-log78.8%
associate-*l*87.8%
associate-*r*87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in j around inf 58.2%
*-commutative58.2%
associate-*r*58.2%
Simplified58.2%
if 6.8000000000000002e-211 < t < 1.8e-112Initial program 94.9%
add-exp-log_binary6464.9%
Applied rewrite-once64.9%
rem-exp-log94.9%
associate-*l*99.9%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around inf 59.5%
if 2.6000000000000001e281 < t < 6.20000000000000038e294Initial program 80.0%
add-exp-log_binary6460.0%
Applied rewrite-once60.0%
rem-exp-log80.0%
associate-*l*60.0%
associate-*r*60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in a around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
Final simplification53.1%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* (* y z) (* x t)))))
(if (<= t -3.4e+27)
t_2
(if (<= t -7.6e-107)
(* -27.0 (* j k))
(if (<= t -6.7e-198)
t_1
(if (<= t 1e-209)
(* j (* k -27.0))
(if (<= t 4.8e-114)
(* b c)
(if (<= t 7.5e+120)
t_1
(if (<= t 2.8e+277)
(* x (* 18.0 (* t (* y z))))
(if (<= t 7.8e+294) (* t (* a -4.0)) t_2))))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double t_2 = 18.0 * ((y * z) * (x * t));
double tmp;
if (t <= -3.4e+27) {
tmp = t_2;
} else if (t <= -7.6e-107) {
tmp = -27.0 * (j * k);
} else if (t <= -6.7e-198) {
tmp = t_1;
} else if (t <= 1e-209) {
tmp = j * (k * -27.0);
} else if (t <= 4.8e-114) {
tmp = b * c;
} else if (t <= 7.5e+120) {
tmp = t_1;
} else if (t <= 2.8e+277) {
tmp = x * (18.0 * (t * (y * z)));
} else if (t <= 7.8e+294) {
tmp = t * (a * -4.0);
} 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 = x * (i * (-4.0d0))
t_2 = 18.0d0 * ((y * z) * (x * t))
if (t <= (-3.4d+27)) then
tmp = t_2
else if (t <= (-7.6d-107)) then
tmp = (-27.0d0) * (j * k)
else if (t <= (-6.7d-198)) then
tmp = t_1
else if (t <= 1d-209) then
tmp = j * (k * (-27.0d0))
else if (t <= 4.8d-114) then
tmp = b * c
else if (t <= 7.5d+120) then
tmp = t_1
else if (t <= 2.8d+277) then
tmp = x * (18.0d0 * (t * (y * z)))
else if (t <= 7.8d+294) then
tmp = t * (a * (-4.0d0))
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 = x * (i * -4.0);
double t_2 = 18.0 * ((y * z) * (x * t));
double tmp;
if (t <= -3.4e+27) {
tmp = t_2;
} else if (t <= -7.6e-107) {
tmp = -27.0 * (j * k);
} else if (t <= -6.7e-198) {
tmp = t_1;
} else if (t <= 1e-209) {
tmp = j * (k * -27.0);
} else if (t <= 4.8e-114) {
tmp = b * c;
} else if (t <= 7.5e+120) {
tmp = t_1;
} else if (t <= 2.8e+277) {
tmp = x * (18.0 * (t * (y * z)));
} else if (t <= 7.8e+294) {
tmp = t * (a * -4.0);
} 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 = x * (i * -4.0) t_2 = 18.0 * ((y * z) * (x * t)) tmp = 0 if t <= -3.4e+27: tmp = t_2 elif t <= -7.6e-107: tmp = -27.0 * (j * k) elif t <= -6.7e-198: tmp = t_1 elif t <= 1e-209: tmp = j * (k * -27.0) elif t <= 4.8e-114: tmp = b * c elif t <= 7.5e+120: tmp = t_1 elif t <= 2.8e+277: tmp = x * (18.0 * (t * (y * z))) elif t <= 7.8e+294: tmp = t * (a * -4.0) 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(x * Float64(i * -4.0)) t_2 = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) tmp = 0.0 if (t <= -3.4e+27) tmp = t_2; elseif (t <= -7.6e-107) tmp = Float64(-27.0 * Float64(j * k)); elseif (t <= -6.7e-198) tmp = t_1; elseif (t <= 1e-209) tmp = Float64(j * Float64(k * -27.0)); elseif (t <= 4.8e-114) tmp = Float64(b * c); elseif (t <= 7.5e+120) tmp = t_1; elseif (t <= 2.8e+277) tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); elseif (t <= 7.8e+294) tmp = Float64(t * Float64(a * -4.0)); 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 = x * (i * -4.0);
t_2 = 18.0 * ((y * z) * (x * t));
tmp = 0.0;
if (t <= -3.4e+27)
tmp = t_2;
elseif (t <= -7.6e-107)
tmp = -27.0 * (j * k);
elseif (t <= -6.7e-198)
tmp = t_1;
elseif (t <= 1e-209)
tmp = j * (k * -27.0);
elseif (t <= 4.8e-114)
tmp = b * c;
elseif (t <= 7.5e+120)
tmp = t_1;
elseif (t <= 2.8e+277)
tmp = x * (18.0 * (t * (y * z)));
elseif (t <= 7.8e+294)
tmp = t * (a * -4.0);
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[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+27], t$95$2, If[LessEqual[t, -7.6e-107], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.7e-198], t$95$1, If[LessEqual[t, 1e-209], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-114], N[(b * c), $MachinePrecision], If[LessEqual[t, 7.5e+120], t$95$1, If[LessEqual[t, 2.8e+277], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.8e+294], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+27}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -7.6 \cdot 10^{-107}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq -6.7 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 10^{-209}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-114}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+277}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+294}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.4e27 or 7.80000000000000026e294 < t Initial program 90.4%
associate--l-90.4%
associate-+l-90.4%
associate--l-90.4%
*-commutative90.4%
associate-*r*83.1%
associate-*l*78.6%
associate-*r*81.5%
*-commutative81.5%
associate-*l*90.1%
associate--l-90.1%
associate-+l-90.1%
Simplified92.2%
Taylor expanded in x around inf 58.9%
Taylor expanded in t around inf 55.6%
Taylor expanded in x around 0 55.6%
associate-*r*55.6%
Simplified55.6%
Taylor expanded in t around 0 55.6%
associate-*r*57.1%
*-commutative57.1%
*-commutative57.1%
Simplified57.1%
if -3.4e27 < t < -7.6000000000000004e-107Initial program 99.6%
Simplified99.7%
Taylor expanded in j around inf 42.9%
if -7.6000000000000004e-107 < t < -6.69999999999999982e-198 or 4.8000000000000002e-114 < t < 7.5000000000000006e120Initial program 84.6%
associate--l-84.6%
associate-+l-84.6%
associate--l-84.6%
*-commutative84.6%
associate-*r*88.3%
associate-*l*92.0%
associate-*r*86.0%
*-commutative86.0%
associate-*l*84.7%
associate--l-84.7%
associate-+l-84.7%
Simplified89.8%
Taylor expanded in x around inf 49.9%
Taylor expanded in t around 0 42.5%
*-commutative42.5%
Simplified42.5%
if -6.69999999999999982e-198 < t < 1e-209Initial program 78.8%
add-exp-log_binary6460.7%
Applied rewrite-once60.7%
rem-exp-log78.8%
associate-*l*87.8%
associate-*r*87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in j around inf 58.2%
*-commutative58.2%
associate-*r*58.2%
Simplified58.2%
if 1e-209 < t < 4.8000000000000002e-114Initial program 94.9%
add-exp-log_binary6464.9%
Applied rewrite-once64.9%
rem-exp-log94.9%
associate-*l*99.9%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around inf 59.5%
if 7.5000000000000006e120 < t < 2.79999999999999985e277Initial program 77.4%
associate--l-77.4%
associate-+l-77.4%
associate--l-77.4%
*-commutative77.4%
associate-*r*74.3%
associate-*l*74.4%
associate-*r*77.4%
*-commutative77.4%
associate-*l*77.4%
associate--l-77.4%
associate-+l-77.4%
Simplified83.9%
Taylor expanded in x around inf 74.9%
Taylor expanded in t around inf 65.6%
if 2.79999999999999985e277 < t < 7.80000000000000026e294Initial program 80.0%
add-exp-log_binary6460.0%
Applied rewrite-once60.0%
rem-exp-log80.0%
associate-*l*60.0%
associate-*r*60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in a around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
Final simplification53.5%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* (* y z) (* x t)))))
(if (<= t -3.75e+26)
t_2
(if (<= t -1.3e-105)
(* -27.0 (* j k))
(if (<= t -3.5e-198)
t_1
(if (<= t 7.5e-210)
(* j (* k -27.0))
(if (<= t 8.5e-111)
(* b c)
(if (<= t 9.6e+120)
t_1
(if (<= t 5.4e+277)
(* x (* 18.0 (* y (* z t))))
(if (<= t 7.5e+294) (* t (* a -4.0)) t_2))))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (i * -4.0);
double t_2 = 18.0 * ((y * z) * (x * t));
double tmp;
if (t <= -3.75e+26) {
tmp = t_2;
} else if (t <= -1.3e-105) {
tmp = -27.0 * (j * k);
} else if (t <= -3.5e-198) {
tmp = t_1;
} else if (t <= 7.5e-210) {
tmp = j * (k * -27.0);
} else if (t <= 8.5e-111) {
tmp = b * c;
} else if (t <= 9.6e+120) {
tmp = t_1;
} else if (t <= 5.4e+277) {
tmp = x * (18.0 * (y * (z * t)));
} else if (t <= 7.5e+294) {
tmp = t * (a * -4.0);
} 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 = x * (i * (-4.0d0))
t_2 = 18.0d0 * ((y * z) * (x * t))
if (t <= (-3.75d+26)) then
tmp = t_2
else if (t <= (-1.3d-105)) then
tmp = (-27.0d0) * (j * k)
else if (t <= (-3.5d-198)) then
tmp = t_1
else if (t <= 7.5d-210) then
tmp = j * (k * (-27.0d0))
else if (t <= 8.5d-111) then
tmp = b * c
else if (t <= 9.6d+120) then
tmp = t_1
else if (t <= 5.4d+277) then
tmp = x * (18.0d0 * (y * (z * t)))
else if (t <= 7.5d+294) then
tmp = t * (a * (-4.0d0))
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 = x * (i * -4.0);
double t_2 = 18.0 * ((y * z) * (x * t));
double tmp;
if (t <= -3.75e+26) {
tmp = t_2;
} else if (t <= -1.3e-105) {
tmp = -27.0 * (j * k);
} else if (t <= -3.5e-198) {
tmp = t_1;
} else if (t <= 7.5e-210) {
tmp = j * (k * -27.0);
} else if (t <= 8.5e-111) {
tmp = b * c;
} else if (t <= 9.6e+120) {
tmp = t_1;
} else if (t <= 5.4e+277) {
tmp = x * (18.0 * (y * (z * t)));
} else if (t <= 7.5e+294) {
tmp = t * (a * -4.0);
} 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 = x * (i * -4.0) t_2 = 18.0 * ((y * z) * (x * t)) tmp = 0 if t <= -3.75e+26: tmp = t_2 elif t <= -1.3e-105: tmp = -27.0 * (j * k) elif t <= -3.5e-198: tmp = t_1 elif t <= 7.5e-210: tmp = j * (k * -27.0) elif t <= 8.5e-111: tmp = b * c elif t <= 9.6e+120: tmp = t_1 elif t <= 5.4e+277: tmp = x * (18.0 * (y * (z * t))) elif t <= 7.5e+294: tmp = t * (a * -4.0) 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(x * Float64(i * -4.0)) t_2 = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) tmp = 0.0 if (t <= -3.75e+26) tmp = t_2; elseif (t <= -1.3e-105) tmp = Float64(-27.0 * Float64(j * k)); elseif (t <= -3.5e-198) tmp = t_1; elseif (t <= 7.5e-210) tmp = Float64(j * Float64(k * -27.0)); elseif (t <= 8.5e-111) tmp = Float64(b * c); elseif (t <= 9.6e+120) tmp = t_1; elseif (t <= 5.4e+277) tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); elseif (t <= 7.5e+294) tmp = Float64(t * Float64(a * -4.0)); 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 = x * (i * -4.0);
t_2 = 18.0 * ((y * z) * (x * t));
tmp = 0.0;
if (t <= -3.75e+26)
tmp = t_2;
elseif (t <= -1.3e-105)
tmp = -27.0 * (j * k);
elseif (t <= -3.5e-198)
tmp = t_1;
elseif (t <= 7.5e-210)
tmp = j * (k * -27.0);
elseif (t <= 8.5e-111)
tmp = b * c;
elseif (t <= 9.6e+120)
tmp = t_1;
elseif (t <= 5.4e+277)
tmp = x * (18.0 * (y * (z * t)));
elseif (t <= 7.5e+294)
tmp = t * (a * -4.0);
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[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.75e+26], t$95$2, If[LessEqual[t, -1.3e-105], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.5e-198], t$95$1, If[LessEqual[t, 7.5e-210], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-111], N[(b * c), $MachinePrecision], If[LessEqual[t, 9.6e+120], t$95$1, If[LessEqual[t, 5.4e+277], N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+294], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{if}\;t \leq -3.75 \cdot 10^{+26}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-105}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-198}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-210}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-111}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{+120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{+277}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+294}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.74999999999999971e26 or 7.4999999999999999e294 < t Initial program 90.4%
associate--l-90.4%
associate-+l-90.4%
associate--l-90.4%
*-commutative90.4%
associate-*r*83.1%
associate-*l*78.6%
associate-*r*81.5%
*-commutative81.5%
associate-*l*90.1%
associate--l-90.1%
associate-+l-90.1%
Simplified92.2%
Taylor expanded in x around inf 58.9%
Taylor expanded in t around inf 55.6%
Taylor expanded in x around 0 55.6%
associate-*r*55.6%
Simplified55.6%
Taylor expanded in t around 0 55.6%
associate-*r*57.1%
*-commutative57.1%
*-commutative57.1%
Simplified57.1%
if -3.74999999999999971e26 < t < -1.2999999999999999e-105Initial program 99.6%
Simplified99.7%
Taylor expanded in j around inf 42.9%
if -1.2999999999999999e-105 < t < -3.50000000000000025e-198 or 8.5000000000000003e-111 < t < 9.60000000000000004e120Initial program 84.6%
associate--l-84.6%
associate-+l-84.6%
associate--l-84.6%
*-commutative84.6%
associate-*r*88.3%
associate-*l*92.0%
associate-*r*86.0%
*-commutative86.0%
associate-*l*84.7%
associate--l-84.7%
associate-+l-84.7%
Simplified89.8%
Taylor expanded in x around inf 49.9%
Taylor expanded in t around 0 42.5%
*-commutative42.5%
Simplified42.5%
if -3.50000000000000025e-198 < t < 7.4999999999999997e-210Initial program 78.8%
add-exp-log_binary6460.7%
Applied rewrite-once60.7%
rem-exp-log78.8%
associate-*l*87.8%
associate-*r*87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in j around inf 58.2%
*-commutative58.2%
associate-*r*58.2%
Simplified58.2%
if 7.4999999999999997e-210 < t < 8.5000000000000003e-111Initial program 94.9%
add-exp-log_binary6464.9%
Applied rewrite-once64.9%
rem-exp-log94.9%
associate-*l*99.9%
associate-*r*99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around inf 59.5%
if 9.60000000000000004e120 < t < 5.39999999999999974e277Initial program 77.4%
associate--l-77.4%
associate-+l-77.4%
associate--l-77.4%
*-commutative77.4%
associate-*r*74.3%
associate-*l*74.4%
associate-*r*77.4%
*-commutative77.4%
associate-*l*77.4%
associate--l-77.4%
associate-+l-77.4%
Simplified83.9%
Taylor expanded in x around inf 74.9%
Taylor expanded in t around inf 65.6%
associate-*r*65.7%
*-commutative65.7%
associate-*r*68.8%
Simplified68.8%
if 5.39999999999999974e277 < t < 7.4999999999999999e294Initial program 80.0%
add-exp-log_binary6460.0%
Applied rewrite-once60.0%
rem-exp-log80.0%
associate-*l*60.0%
associate-*r*60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in a around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
Final simplification53.9%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))))
(if (<= t -2.4e+27)
t_3
(if (<= t -6e-104)
t_2
(if (<= t -3.4e-198)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 2e-112)
t_2
(if (<= t 8.6e+38)
(+ t_1 (* -4.0 (* x i)))
(if (<= t 1.7e+184)
(* x (+ (* i -4.0) (* 18.0 (* y (* z t)))))
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 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -2.4e+27) {
tmp = t_3;
} else if (t <= -6e-104) {
tmp = t_2;
} else if (t <= -3.4e-198) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 2e-112) {
tmp = t_2;
} else if (t <= 8.6e+38) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 1.7e+184) {
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
} 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 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
t_3 = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
if (t <= (-2.4d+27)) then
tmp = t_3
else if (t <= (-6d-104)) then
tmp = t_2
else if (t <= (-3.4d-198)) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 2d-112) then
tmp = t_2
else if (t <= 8.6d+38) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if (t <= 1.7d+184) then
tmp = x * ((i * (-4.0d0)) + (18.0d0 * (y * (z * t))))
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 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -2.4e+27) {
tmp = t_3;
} else if (t <= -6e-104) {
tmp = t_2;
} else if (t <= -3.4e-198) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 2e-112) {
tmp = t_2;
} else if (t <= 8.6e+38) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 1.7e+184) {
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
} 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 = j * (k * -27.0) t_2 = (b * c) + t_1 t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0)) tmp = 0 if t <= -2.4e+27: tmp = t_3 elif t <= -6e-104: tmp = t_2 elif t <= -3.4e-198: tmp = (b * c) - (x * (4.0 * i)) elif t <= 2e-112: tmp = t_2 elif t <= 8.6e+38: tmp = t_1 + (-4.0 * (x * i)) elif t <= 1.7e+184: tmp = x * ((i * -4.0) + (18.0 * (y * (z * t)))) 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(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))) tmp = 0.0 if (t <= -2.4e+27) tmp = t_3; elseif (t <= -6e-104) tmp = t_2; elseif (t <= -3.4e-198) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 2e-112) tmp = t_2; elseif (t <= 8.6e+38) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (t <= 1.7e+184) tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(y * Float64(z * t))))); 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 = j * (k * -27.0);
t_2 = (b * c) + t_1;
t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
tmp = 0.0;
if (t <= -2.4e+27)
tmp = t_3;
elseif (t <= -6e-104)
tmp = t_2;
elseif (t <= -3.4e-198)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 2e-112)
tmp = t_2;
elseif (t <= 8.6e+38)
tmp = t_1 + (-4.0 * (x * i));
elseif (t <= 1.7e+184)
tmp = x * ((i * -4.0) + (18.0 * (y * (z * t))));
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.4e+27], t$95$3, If[LessEqual[t, -6e-104], t$95$2, If[LessEqual[t, -3.4e-198], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-112], t$95$2, If[LessEqual[t, 8.6e+38], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.7e+184], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
t_3 := t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{+27}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-104}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-198}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-112}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{+38}:\\
\;\;\;\;t_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{+184}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -2.39999999999999998e27 or 1.7000000000000001e184 < t Initial program 85.1%
add-exp-log_binary6443.8%
Applied rewrite-once43.8%
rem-exp-log85.1%
associate-*l*77.4%
associate-*r*77.4%
*-commutative77.4%
Simplified77.4%
Taylor expanded in t around inf 79.7%
cancel-sign-sub-inv79.7%
associate-*r*79.7%
metadata-eval79.7%
*-commutative79.7%
Simplified79.7%
if -2.39999999999999998e27 < t < -6.0000000000000005e-104 or -3.3999999999999998e-198 < t < 1.9999999999999999e-112Initial program 89.8%
Simplified88.5%
Taylor expanded in b around inf 68.5%
if -6.0000000000000005e-104 < t < -3.3999999999999998e-198Initial program 72.4%
associate--l-72.4%
associate-+l-72.4%
associate--l-72.4%
*-commutative72.4%
associate-*r*85.9%
associate-*l*95.0%
associate-*r*77.1%
*-commutative77.1%
associate-*l*72.6%
associate--l-72.6%
associate-+l-72.6%
Simplified77.2%
Taylor expanded in t around 0 77.7%
Taylor expanded in i around inf 70.0%
*-commutative70.0%
*-commutative70.0%
associate-*r*70.0%
Simplified70.0%
if 1.9999999999999999e-112 < t < 8.5999999999999994e38Initial program 85.6%
Simplified95.2%
Taylor expanded in i around inf 71.1%
if 8.5999999999999994e38 < t < 1.7000000000000001e184Initial program 96.0%
associate--l-96.0%
associate-+l-96.0%
associate--l-96.0%
*-commutative96.0%
associate-*r*92.4%
associate-*l*92.5%
associate-*r*92.3%
*-commutative92.3%
associate-*l*92.2%
associate--l-92.2%
associate-+l-92.2%
Simplified96.1%
Taylor expanded in x around inf 69.8%
cancel-sign-sub-inv69.8%
+-commutative69.8%
metadata-eval69.8%
*-commutative69.8%
*-commutative69.8%
associate-*l*69.8%
*-commutative69.8%
Applied egg-rr69.8%
Final simplification73.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
(if (<= t -7e+43)
(+ (* j (* k -27.0)) (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))
(if (<= t 1.65e+121)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(* t (+ (* (* x 18.0) (* y z)) (* a -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 <= -7e+43) {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
} else if (t <= 1.65e+121) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * (((x * 18.0) * (y * z)) + (a * -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 <= (-7d+43)) then
tmp = (j * (k * (-27.0d0))) + (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0))))
else if (t <= 1.65d+121) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = t * (((x * 18.0d0) * (y * z)) + (a * (-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 <= -7e+43) {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
} else if (t <= 1.65e+121) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * (((x * 18.0) * (y * z)) + (a * -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 <= -7e+43: tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0))) elif t <= 1.65e+121: tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = t * (((x * 18.0) * (y * z)) + (a * -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 <= -7e+43) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))); elseif (t <= 1.65e+121) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -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 <= -7e+43)
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
elseif (t <= 1.65e+121)
tmp = ((b * c) + (-4.0 * (t * a))) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = t * (((x * 18.0) * (y * z)) + (a * -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, -7e+43], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+121], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+43}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+121}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if t < -7.0000000000000002e43Initial program 92.6%
Simplified91.1%
Taylor expanded in t around inf 89.2%
if -7.0000000000000002e43 < t < 1.6499999999999999e121Initial program 87.0%
associate--l-87.0%
associate-+l-87.0%
associate--l-87.0%
*-commutative87.0%
associate-*r*91.8%
associate-*l*95.5%
associate-*r*91.3%
*-commutative91.3%
associate-*l*87.7%
associate--l-87.7%
associate-+l-87.7%
Simplified89.5%
Taylor expanded in y around 0 86.8%
if 1.6499999999999999e121 < t Initial program 76.9%
add-exp-log_binary6443.3%
Applied rewrite-once43.3%
rem-exp-log76.9%
associate-*l*69.3%
associate-*r*69.3%
*-commutative69.3%
Simplified69.3%
Taylor expanded in t around inf 85.4%
cancel-sign-sub-inv85.4%
associate-*r*85.4%
metadata-eval85.4%
*-commutative85.4%
Simplified85.4%
Final simplification87.1%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (* 18.0 (* (* y z) (* x t)))))
(if (<= t -9.6e+26)
t_3
(if (<= t -6.8e-105)
t_2
(if (<= t -3.4e-198)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 3.15e-111)
t_2
(if (<= t 2.4e+128)
(+ t_1 (* -4.0 (* x i)))
(if (<= t 7e+279)
(* x (* 18.0 (* y (* z t))))
(if (<= t 6e+294) (* t (* a -4.0)) t_3)))))))))assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = 18.0 * ((y * z) * (x * t));
double tmp;
if (t <= -9.6e+26) {
tmp = t_3;
} else if (t <= -6.8e-105) {
tmp = t_2;
} else if (t <= -3.4e-198) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 3.15e-111) {
tmp = t_2;
} else if (t <= 2.4e+128) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 7e+279) {
tmp = x * (18.0 * (y * (z * t)));
} else if (t <= 6e+294) {
tmp = t * (a * -4.0);
} 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 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
t_3 = 18.0d0 * ((y * z) * (x * t))
if (t <= (-9.6d+26)) then
tmp = t_3
else if (t <= (-6.8d-105)) then
tmp = t_2
else if (t <= (-3.4d-198)) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 3.15d-111) then
tmp = t_2
else if (t <= 2.4d+128) then
tmp = t_1 + ((-4.0d0) * (x * i))
else if (t <= 7d+279) then
tmp = x * (18.0d0 * (y * (z * t)))
else if (t <= 6d+294) then
tmp = t * (a * (-4.0d0))
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 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = 18.0 * ((y * z) * (x * t));
double tmp;
if (t <= -9.6e+26) {
tmp = t_3;
} else if (t <= -6.8e-105) {
tmp = t_2;
} else if (t <= -3.4e-198) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 3.15e-111) {
tmp = t_2;
} else if (t <= 2.4e+128) {
tmp = t_1 + (-4.0 * (x * i));
} else if (t <= 7e+279) {
tmp = x * (18.0 * (y * (z * t)));
} else if (t <= 6e+294) {
tmp = t * (a * -4.0);
} 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 = j * (k * -27.0) t_2 = (b * c) + t_1 t_3 = 18.0 * ((y * z) * (x * t)) tmp = 0 if t <= -9.6e+26: tmp = t_3 elif t <= -6.8e-105: tmp = t_2 elif t <= -3.4e-198: tmp = (b * c) - (x * (4.0 * i)) elif t <= 3.15e-111: tmp = t_2 elif t <= 2.4e+128: tmp = t_1 + (-4.0 * (x * i)) elif t <= 7e+279: tmp = x * (18.0 * (y * (z * t))) elif t <= 6e+294: tmp = t * (a * -4.0) 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(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) tmp = 0.0 if (t <= -9.6e+26) tmp = t_3; elseif (t <= -6.8e-105) tmp = t_2; elseif (t <= -3.4e-198) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 3.15e-111) tmp = t_2; elseif (t <= 2.4e+128) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); elseif (t <= 7e+279) tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); elseif (t <= 6e+294) tmp = Float64(t * Float64(a * -4.0)); 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 = j * (k * -27.0);
t_2 = (b * c) + t_1;
t_3 = 18.0 * ((y * z) * (x * t));
tmp = 0.0;
if (t <= -9.6e+26)
tmp = t_3;
elseif (t <= -6.8e-105)
tmp = t_2;
elseif (t <= -3.4e-198)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 3.15e-111)
tmp = t_2;
elseif (t <= 2.4e+128)
tmp = t_1 + (-4.0 * (x * i));
elseif (t <= 7e+279)
tmp = x * (18.0 * (y * (z * t)));
elseif (t <= 6e+294)
tmp = t * (a * -4.0);
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.6e+26], t$95$3, If[LessEqual[t, -6.8e-105], t$95$2, If[LessEqual[t, -3.4e-198], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.15e-111], t$95$2, If[LessEqual[t, 2.4e+128], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e+279], N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e+294], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
t_3 := 18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{if}\;t \leq -9.6 \cdot 10^{+26}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-105}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{-198}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 3.15 \cdot 10^{-111}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+128}:\\
\;\;\;\;t_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+279}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+294}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -9.60000000000000018e26 or 6.00000000000000011e294 < t Initial program 90.4%
associate--l-90.4%
associate-+l-90.4%
associate--l-90.4%
*-commutative90.4%
associate-*r*83.1%
associate-*l*78.6%
associate-*r*81.5%
*-commutative81.5%
associate-*l*90.1%
associate--l-90.1%
associate-+l-90.1%
Simplified92.2%
Taylor expanded in x around inf 58.9%
Taylor expanded in t around inf 55.6%
Taylor expanded in x around 0 55.6%
associate-*r*55.6%
Simplified55.6%
Taylor expanded in t around 0 55.6%
associate-*r*57.1%
*-commutative57.1%
*-commutative57.1%
Simplified57.1%
if -9.60000000000000018e26 < t < -6.79999999999999984e-105 or -3.3999999999999998e-198 < t < 3.1500000000000002e-111Initial program 89.8%
Simplified88.5%
Taylor expanded in b around inf 68.5%
if -6.79999999999999984e-105 < t < -3.3999999999999998e-198Initial program 72.4%
associate--l-72.4%
associate-+l-72.4%
associate--l-72.4%
*-commutative72.4%
associate-*r*85.9%
associate-*l*95.0%
associate-*r*77.1%
*-commutative77.1%
associate-*l*72.6%
associate--l-72.6%
associate-+l-72.6%
Simplified77.2%
Taylor expanded in t around 0 77.7%
Taylor expanded in i around inf 70.0%
*-commutative70.0%
*-commutative70.0%
associate-*r*70.0%
Simplified70.0%
if 3.1500000000000002e-111 < t < 2.4000000000000002e128Initial program 89.1%
Simplified96.3%
Taylor expanded in i around inf 64.5%
if 2.4000000000000002e128 < t < 7.00000000000000003e279Initial program 77.4%
associate--l-77.4%
associate-+l-77.4%
associate--l-77.4%
*-commutative77.4%
associate-*r*74.3%
associate-*l*74.4%
associate-*r*77.4%
*-commutative77.4%
associate-*l*77.4%
associate--l-77.4%
associate-+l-77.4%
Simplified83.9%
Taylor expanded in x around inf 74.9%
Taylor expanded in t around inf 65.6%
associate-*r*65.7%
*-commutative65.7%
associate-*r*68.8%
Simplified68.8%
if 7.00000000000000003e279 < t < 6.00000000000000011e294Initial program 80.0%
add-exp-log_binary6460.0%
Applied rewrite-once60.0%
rem-exp-log80.0%
associate-*l*60.0%
associate-*r*60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in a around inf 100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
Final simplification65.5%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (+ (* b c) t_1))
(t_3 (* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))))
(if (<= t -1.06e+27)
t_3
(if (<= t -2.15e-104)
t_2
(if (<= t -5e-198)
(- (* b c) (* x (* 4.0 i)))
(if (<= t 5.4e-114)
t_2
(if (<= t 7e+120) (+ t_1 (* -4.0 (* x i))) 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 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -1.06e+27) {
tmp = t_3;
} else if (t <= -2.15e-104) {
tmp = t_2;
} else if (t <= -5e-198) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 5.4e-114) {
tmp = t_2;
} else if (t <= 7e+120) {
tmp = t_1 + (-4.0 * (x * i));
} 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 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
t_3 = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
if (t <= (-1.06d+27)) then
tmp = t_3
else if (t <= (-2.15d-104)) then
tmp = t_2
else if (t <= (-5d-198)) then
tmp = (b * c) - (x * (4.0d0 * i))
else if (t <= 5.4d-114) then
tmp = t_2
else if (t <= 7d+120) then
tmp = t_1 + ((-4.0d0) * (x * i))
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 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -1.06e+27) {
tmp = t_3;
} else if (t <= -2.15e-104) {
tmp = t_2;
} else if (t <= -5e-198) {
tmp = (b * c) - (x * (4.0 * i));
} else if (t <= 5.4e-114) {
tmp = t_2;
} else if (t <= 7e+120) {
tmp = t_1 + (-4.0 * (x * i));
} 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 = j * (k * -27.0) t_2 = (b * c) + t_1 t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0)) tmp = 0 if t <= -1.06e+27: tmp = t_3 elif t <= -2.15e-104: tmp = t_2 elif t <= -5e-198: tmp = (b * c) - (x * (4.0 * i)) elif t <= 5.4e-114: tmp = t_2 elif t <= 7e+120: tmp = t_1 + (-4.0 * (x * i)) 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(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))) tmp = 0.0 if (t <= -1.06e+27) tmp = t_3; elseif (t <= -2.15e-104) tmp = t_2; elseif (t <= -5e-198) tmp = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))); elseif (t <= 5.4e-114) tmp = t_2; elseif (t <= 7e+120) tmp = Float64(t_1 + Float64(-4.0 * Float64(x * i))); 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 = j * (k * -27.0);
t_2 = (b * c) + t_1;
t_3 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
tmp = 0.0;
if (t <= -1.06e+27)
tmp = t_3;
elseif (t <= -2.15e-104)
tmp = t_2;
elseif (t <= -5e-198)
tmp = (b * c) - (x * (4.0 * i));
elseif (t <= 5.4e-114)
tmp = t_2;
elseif (t <= 7e+120)
tmp = t_1 + (-4.0 * (x * i));
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.06e+27], t$95$3, If[LessEqual[t, -2.15e-104], t$95$2, If[LessEqual[t, -5e-198], N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.4e-114], t$95$2, If[LessEqual[t, 7e+120], N[(t$95$1 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t_1\\
t_3 := t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -1.06 \cdot 10^{+27}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq -2.15 \cdot 10^{-104}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-198}:\\
\;\;\;\;b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-114}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+120}:\\
\;\;\;\;t_1 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -1.05999999999999994e27 or 7.00000000000000015e120 < t Initial program 85.8%
add-exp-log_binary6443.4%
Applied rewrite-once43.4%
rem-exp-log85.8%
associate-*l*78.2%
associate-*r*78.2%
*-commutative78.2%
Simplified78.2%
Taylor expanded in t around inf 77.4%
cancel-sign-sub-inv77.4%
associate-*r*77.4%
metadata-eval77.4%
*-commutative77.4%
Simplified77.4%
if -1.05999999999999994e27 < t < -2.15000000000000005e-104 or -4.9999999999999999e-198 < t < 5.3999999999999999e-114Initial program 89.8%
Simplified88.5%
Taylor expanded in b around inf 68.5%
if -2.15000000000000005e-104 < t < -4.9999999999999999e-198Initial program 72.4%
associate--l-72.4%
associate-+l-72.4%
associate--l-72.4%
*-commutative72.4%
associate-*r*85.9%
associate-*l*95.0%
associate-*r*77.1%
*-commutative77.1%
associate-*l*72.6%
associate--l-72.6%
associate-+l-72.6%
Simplified77.2%
Taylor expanded in t around 0 77.7%
Taylor expanded in i around inf 70.0%
*-commutative70.0%
*-commutative70.0%
associate-*r*70.0%
Simplified70.0%
if 5.3999999999999999e-114 < t < 7.00000000000000015e120Initial program 89.1%
Simplified96.3%
Taylor expanded in i around inf 64.5%
Final simplification71.2%
NOTE: y and z should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -8.6e+44)
(+ (* j (* k -27.0)) (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))
(if (<= t 5e+125)
(- (* b c) (+ (* 4.0 (* x i)) (* 27.0 (* j k))))
(* t (+ (* (* x 18.0) (* y z)) (* a -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 <= -8.6e+44) {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
} else if (t <= 5e+125) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * (((x * 18.0) * (y * z)) + (a * -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 <= (-8.6d+44)) then
tmp = (j * (k * (-27.0d0))) + (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0))))
else if (t <= 5d+125) then
tmp = (b * c) - ((4.0d0 * (x * i)) + (27.0d0 * (j * k)))
else
tmp = t * (((x * 18.0d0) * (y * z)) + (a * (-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 <= -8.6e+44) {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
} else if (t <= 5e+125) {
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
} else {
tmp = t * (((x * 18.0) * (y * z)) + (a * -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 <= -8.6e+44: tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0))) elif t <= 5e+125: tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k))) else: tmp = t * (((x * 18.0) * (y * z)) + (a * -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 <= -8.6e+44) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))); elseif (t <= 5e+125) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + Float64(27.0 * Float64(j * k)))); else tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -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 <= -8.6e+44)
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
elseif (t <= 5e+125)
tmp = (b * c) - ((4.0 * (x * i)) + (27.0 * (j * k)));
else
tmp = t * (((x * 18.0) * (y * z)) + (a * -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, -8.6e+44], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+125], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+44}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+125}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if t < -8.59999999999999965e44Initial program 92.6%
Simplified91.1%
Taylor expanded in t around inf 89.2%
if -8.59999999999999965e44 < t < 4.99999999999999962e125Initial program 87.0%
associate--l-87.0%
associate-+l-87.0%
associate--l-87.0%
*-commutative87.0%
associate-*r*91.8%
associate-*l*95.5%
associate-*r*91.3%
*-commutative91.3%
associate-*l*87.7%
associate--l-87.7%
associate-+l-87.7%
Simplified89.5%
Taylor expanded in t around 0 79.8%
if 4.99999999999999962e125 < t Initial program 76.9%
add-exp-log_binary6443.3%
Applied rewrite-once43.3%
rem-exp-log76.9%
associate-*l*69.3%
associate-*r*69.3%
*-commutative69.3%
Simplified69.3%
Taylor expanded in t around inf 85.4%
cancel-sign-sub-inv85.4%
associate-*r*85.4%
metadata-eval85.4%
*-commutative85.4%
Simplified85.4%
Final simplification82.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 (+ (* b c) (* j (* k -27.0)))) (t_2 (* x (* i -4.0))))
(if (<= x -1.5e+246)
t_2
(if (<= x -14000000000.0)
(* x (* 18.0 (* y (* z t))))
(if (<= x -3.6e-22)
t_1
(if (<= x -8e-76)
(* (* x 18.0) (* t (* y z)))
(if (<= x 3.6e+151) 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) + (j * (k * -27.0));
double t_2 = x * (i * -4.0);
double tmp;
if (x <= -1.5e+246) {
tmp = t_2;
} else if (x <= -14000000000.0) {
tmp = x * (18.0 * (y * (z * t)));
} else if (x <= -3.6e-22) {
tmp = t_1;
} else if (x <= -8e-76) {
tmp = (x * 18.0) * (t * (y * z));
} else if (x <= 3.6e+151) {
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) + (j * (k * (-27.0d0)))
t_2 = x * (i * (-4.0d0))
if (x <= (-1.5d+246)) then
tmp = t_2
else if (x <= (-14000000000.0d0)) then
tmp = x * (18.0d0 * (y * (z * t)))
else if (x <= (-3.6d-22)) then
tmp = t_1
else if (x <= (-8d-76)) then
tmp = (x * 18.0d0) * (t * (y * z))
else if (x <= 3.6d+151) 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) + (j * (k * -27.0));
double t_2 = x * (i * -4.0);
double tmp;
if (x <= -1.5e+246) {
tmp = t_2;
} else if (x <= -14000000000.0) {
tmp = x * (18.0 * (y * (z * t)));
} else if (x <= -3.6e-22) {
tmp = t_1;
} else if (x <= -8e-76) {
tmp = (x * 18.0) * (t * (y * z));
} else if (x <= 3.6e+151) {
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) + (j * (k * -27.0)) t_2 = x * (i * -4.0) tmp = 0 if x <= -1.5e+246: tmp = t_2 elif x <= -14000000000.0: tmp = x * (18.0 * (y * (z * t))) elif x <= -3.6e-22: tmp = t_1 elif x <= -8e-76: tmp = (x * 18.0) * (t * (y * z)) elif x <= 3.6e+151: 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(j * Float64(k * -27.0))) t_2 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (x <= -1.5e+246) tmp = t_2; elseif (x <= -14000000000.0) tmp = Float64(x * Float64(18.0 * Float64(y * Float64(z * t)))); elseif (x <= -3.6e-22) tmp = t_1; elseif (x <= -8e-76) tmp = Float64(Float64(x * 18.0) * Float64(t * Float64(y * z))); elseif (x <= 3.6e+151) 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) + (j * (k * -27.0));
t_2 = x * (i * -4.0);
tmp = 0.0;
if (x <= -1.5e+246)
tmp = t_2;
elseif (x <= -14000000000.0)
tmp = x * (18.0 * (y * (z * t)));
elseif (x <= -3.6e-22)
tmp = t_1;
elseif (x <= -8e-76)
tmp = (x * 18.0) * (t * (y * z));
elseif (x <= 3.6e+151)
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.5e+246], t$95$2, If[LessEqual[x, -14000000000.0], N[(x * N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.6e-22], t$95$1, If[LessEqual[x, -8e-76], N[(N[(x * 18.0), $MachinePrecision] * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.6e+151], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{+246}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -14000000000:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{-22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-76}:\\
\;\;\;\;\left(x \cdot 18\right) \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+151}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -1.5e246 or 3.6e151 < x Initial program 70.6%
associate--l-70.6%
associate-+l-70.6%
associate--l-70.6%
*-commutative70.6%
associate-*r*73.0%
associate-*l*84.2%
associate-*r*79.5%
*-commutative79.5%
associate-*l*77.4%
associate--l-77.4%
associate-+l-77.4%
Simplified82.0%
Taylor expanded in x around inf 87.6%
Taylor expanded in t around 0 65.7%
*-commutative65.7%
Simplified65.7%
if -1.5e246 < x < -1.4e10Initial program 84.1%
associate--l-84.1%
associate-+l-84.1%
associate--l-84.1%
*-commutative84.1%
associate-*r*83.9%
associate-*l*83.9%
associate-*r*82.2%
*-commutative82.2%
associate-*l*82.2%
associate--l-82.2%
associate-+l-82.2%
Simplified88.2%
Taylor expanded in x around inf 60.9%
Taylor expanded in t around inf 45.9%
associate-*r*49.8%
*-commutative49.8%
associate-*r*49.8%
Simplified49.8%
if -1.4e10 < x < -3.5999999999999998e-22 or -7.99999999999999942e-76 < x < 3.6e151Initial program 91.9%
Simplified92.7%
Taylor expanded in b around inf 57.8%
if -3.5999999999999998e-22 < x < -7.99999999999999942e-76Initial program 90.5%
associate--l-90.5%
associate-+l-90.5%
associate--l-90.5%
*-commutative90.5%
associate-*r*82.0%
associate-*l*82.1%
associate-*r*81.8%
*-commutative81.8%
associate-*l*81.9%
associate--l-81.9%
associate-+l-81.9%
Simplified90.9%
Taylor expanded in x around inf 79.3%
Taylor expanded in t around inf 63.1%
add-exp-log_binary6427.7%
Applied rewrite-once27.7%
rem-exp-log63.1%
associate-*r*63.3%
Simplified63.3%
Final simplification57.9%
NOTE: y and z should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -1.5e+52) (not (<= t 4.2e+126))) (* t (+ (* (* x 18.0) (* y z)) (* a -4.0))) (- (* b c) (+ (* 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 ((t <= -1.5e+52) || !(t <= 4.2e+126)) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (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 ((t <= (-1.5d+52)) .or. (.not. (t <= 4.2d+126))) then
tmp = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
else
tmp = (b * c) - ((4.0d0 * (x * i)) + (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 ((t <= -1.5e+52) || !(t <= 4.2e+126)) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else {
tmp = (b * c) - ((4.0 * (x * i)) + (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 (t <= -1.5e+52) or not (t <= 4.2e+126): tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0)) else: tmp = (b * c) - ((4.0 * (x * i)) + (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 ((t <= -1.5e+52) || !(t <= 4.2e+126)) tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(x * i)) + 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 ((t <= -1.5e+52) || ~((t <= 4.2e+126)))
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
else
tmp = (b * c) - ((4.0 * (x * i)) + (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[Or[LessEqual[t, -1.5e+52], N[Not[LessEqual[t, 4.2e+126]], $MachinePrecision]], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+52} \lor \neg \left(t \leq 4.2 \cdot 10^{+126}\right):\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(x \cdot i\right) + 27 \cdot \left(j \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -1.5e52 or 4.1999999999999998e126 < t Initial program 86.1%
add-exp-log_binary6442.6%
Applied rewrite-once42.6%
rem-exp-log86.1%
associate-*l*78.1%
associate-*r*78.1%
*-commutative78.1%
Simplified78.1%
Taylor expanded in t around inf 79.3%
cancel-sign-sub-inv79.3%
associate-*r*79.3%
metadata-eval79.3%
*-commutative79.3%
Simplified79.3%
if -1.5e52 < t < 4.1999999999999998e126Initial program 87.0%
associate--l-87.0%
associate-+l-87.0%
associate--l-87.0%
*-commutative87.0%
associate-*r*91.8%
associate-*l*95.5%
associate-*r*91.3%
*-commutative91.3%
associate-*l*87.7%
associate--l-87.7%
associate-+l-87.7%
Simplified89.5%
Taylor expanded in t around 0 79.8%
Final simplification79.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 (+ (* b c) (* j (* k -27.0)))) (t_2 (- (* b c) (* x (* 4.0 i)))))
(if (<= i -18.5)
t_2
(if (<= i 5.2e-85)
t_1
(if (<= i 1.6e-18)
(* x (* 18.0 (* t (* y z))))
(if (<= i 8.5e+147) 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) + (j * (k * -27.0));
double t_2 = (b * c) - (x * (4.0 * i));
double tmp;
if (i <= -18.5) {
tmp = t_2;
} else if (i <= 5.2e-85) {
tmp = t_1;
} else if (i <= 1.6e-18) {
tmp = x * (18.0 * (t * (y * z)));
} else if (i <= 8.5e+147) {
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) + (j * (k * (-27.0d0)))
t_2 = (b * c) - (x * (4.0d0 * i))
if (i <= (-18.5d0)) then
tmp = t_2
else if (i <= 5.2d-85) then
tmp = t_1
else if (i <= 1.6d-18) then
tmp = x * (18.0d0 * (t * (y * z)))
else if (i <= 8.5d+147) 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) + (j * (k * -27.0));
double t_2 = (b * c) - (x * (4.0 * i));
double tmp;
if (i <= -18.5) {
tmp = t_2;
} else if (i <= 5.2e-85) {
tmp = t_1;
} else if (i <= 1.6e-18) {
tmp = x * (18.0 * (t * (y * z)));
} else if (i <= 8.5e+147) {
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) + (j * (k * -27.0)) t_2 = (b * c) - (x * (4.0 * i)) tmp = 0 if i <= -18.5: tmp = t_2 elif i <= 5.2e-85: tmp = t_1 elif i <= 1.6e-18: tmp = x * (18.0 * (t * (y * z))) elif i <= 8.5e+147: 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(j * Float64(k * -27.0))) t_2 = Float64(Float64(b * c) - Float64(x * Float64(4.0 * i))) tmp = 0.0 if (i <= -18.5) tmp = t_2; elseif (i <= 5.2e-85) tmp = t_1; elseif (i <= 1.6e-18) tmp = Float64(x * Float64(18.0 * Float64(t * Float64(y * z)))); elseif (i <= 8.5e+147) 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) + (j * (k * -27.0));
t_2 = (b * c) - (x * (4.0 * i));
tmp = 0.0;
if (i <= -18.5)
tmp = t_2;
elseif (i <= 5.2e-85)
tmp = t_1;
elseif (i <= 1.6e-18)
tmp = x * (18.0 * (t * (y * z)));
elseif (i <= 8.5e+147)
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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -18.5], t$95$2, If[LessEqual[i, 5.2e-85], t$95$1, If[LessEqual[i, 1.6e-18], N[(x * N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 8.5e+147], t$95$1, t$95$2]]]]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
t_1 := b \cdot c + j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - x \cdot \left(4 \cdot i\right)\\
\mathbf{if}\;i \leq -18.5:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 5.2 \cdot 10^{-85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 1.6 \cdot 10^{-18}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;i \leq 8.5 \cdot 10^{+147}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if i < -18.5 or 8.5000000000000007e147 < i Initial program 85.9%
associate--l-85.9%
associate-+l-85.9%
associate--l-85.9%
*-commutative85.9%
associate-*r*88.0%
associate-*l*91.2%
associate-*r*87.0%
*-commutative87.0%
associate-*l*85.9%
associate--l-85.9%
associate-+l-85.9%
Simplified90.3%
Taylor expanded in t around 0 76.0%
Taylor expanded in i around inf 65.4%
*-commutative65.4%
*-commutative65.4%
associate-*r*65.4%
Simplified65.4%
if -18.5 < i < 5.20000000000000023e-85 or 1.6e-18 < i < 8.5000000000000007e147Initial program 86.9%
Simplified89.1%
Taylor expanded in b around inf 55.2%
if 5.20000000000000023e-85 < i < 1.6e-18Initial program 88.9%
associate--l-88.9%
associate-+l-88.9%
associate--l-88.9%
*-commutative88.9%
associate-*r*78.5%
associate-*l*72.9%
associate-*r*78.2%
*-commutative78.2%
associate-*l*88.8%
associate--l-88.8%
associate-+l-88.8%
Simplified88.9%
Taylor expanded in x around inf 73.1%
Taylor expanded in t around inf 62.3%
Final simplification59.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 (if (<= (* b c) -5e+60) (* b c) (if (<= (* b c) 6e+64) (* -27.0 (* j k)) (* b c))))
assert(y < z);
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+60) {
tmp = b * c;
} else if ((b * c) <= 6e+64) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
NOTE: y and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5d+60)) then
tmp = b * c
else if ((b * c) <= 6d+64) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
assert y < z;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+60) {
tmp = b * c;
} else if ((b * c) <= 6e+64) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5e+60: tmp = b * c elif (b * c) <= 6e+64: tmp = -27.0 * (j * k) else: tmp = b * c return tmp
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5e+60) tmp = Float64(b * c); elseif (Float64(b * c) <= 6e+64) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
y, z = num2cell(sort([y, z])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k)
tmp = 0.0;
if ((b * c) <= -5e+60)
tmp = b * c;
elseif ((b * c) <= 6e+64)
tmp = -27.0 * (j * k);
else
tmp = b * c;
end
tmp_2 = tmp;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+60], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6e+64], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+60}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 6 \cdot 10^{+64}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -4.99999999999999975e60 or 6.0000000000000004e64 < (*.f64 b c) Initial program 83.0%
add-exp-log_binary6454.2%
Applied rewrite-once54.2%
rem-exp-log83.0%
associate-*l*85.1%
associate-*r*85.1%
*-commutative85.1%
Simplified85.1%
Taylor expanded in b around inf 50.9%
if -4.99999999999999975e60 < (*.f64 b c) < 6.0000000000000004e64Initial program 88.8%
Simplified92.0%
Taylor expanded in j around inf 31.2%
Final simplification38.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 (<= x -4.5e-68) (not (<= x 2.08e+37))) (* x (* i -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 ((x <= -4.5e-68) || !(x <= 2.08e+37)) {
tmp = x * (i * -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 ((x <= (-4.5d-68)) .or. (.not. (x <= 2.08d+37))) then
tmp = x * (i * (-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 ((x <= -4.5e-68) || !(x <= 2.08e+37)) {
tmp = x * (i * -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 (x <= -4.5e-68) or not (x <= 2.08e+37): tmp = x * (i * -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 ((x <= -4.5e-68) || !(x <= 2.08e+37)) tmp = Float64(x * Float64(i * -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 ((x <= -4.5e-68) || ~((x <= 2.08e+37)))
tmp = x * (i * -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[Or[LessEqual[x, -4.5e-68], N[Not[LessEqual[x, 2.08e+37]], $MachinePrecision]], N[(x * N[(i * -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}\;x \leq -4.5 \cdot 10^{-68} \lor \neg \left(x \leq 2.08 \cdot 10^{+37}\right):\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -4.49999999999999999e-68 or 2.0800000000000001e37 < x Initial program 80.8%
associate--l-80.8%
associate-+l-80.8%
associate--l-80.8%
*-commutative80.8%
associate-*r*81.5%
associate-*l*85.7%
associate-*r*82.3%
*-commutative82.3%
associate-*l*80.9%
associate--l-80.9%
associate-+l-80.9%
Simplified85.9%
Taylor expanded in x around inf 65.4%
Taylor expanded in t around 0 38.2%
*-commutative38.2%
Simplified38.2%
if -4.49999999999999999e-68 < x < 2.0800000000000001e37Initial program 93.8%
Simplified93.0%
Taylor expanded in j around inf 38.9%
Final simplification38.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 (* b c))
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 b * c;
}
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 = b * c
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 b * c;
}
[y, z] = sort([y, z]) def code(x, y, z, t, a, b, c, i, j, k): return b * c
y, z = sort([y, z]) function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
y, z = num2cell(sort([y, z])){:}
function tmp = code(x, y, z, t, a, b, c, i, j, k)
tmp = b * c;
end
NOTE: y and z should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
[y, z] = \mathsf{sort}([y, z])\\
\\
b \cdot c
\end{array}
Initial program 86.7%
add-exp-log_binary6450.2%
Applied rewrite-once50.2%
rem-exp-log86.7%
associate-*l*86.3%
associate-*r*86.3%
*-commutative86.3%
Simplified86.3%
Taylor expanded in b around inf 21.7%
Final simplification21.7%
(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 2023297
(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)))