
(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}
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
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 * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (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)) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf) tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))); else tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[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], Infinity], 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[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\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 \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 95.6%
Simplified96.5%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified19.4%
Taylor expanded in y around inf 13.9%
Taylor expanded in x around inf 58.6%
cancel-sign-sub-inv58.6%
metadata-eval58.6%
associate-*r*66.8%
Simplified66.8%
Final simplification92.3%
(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 (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -1.26e+76)
t_3
(if (<= t -2e+19)
t_2
(if (<= t -2.7e-17)
(+ t_1 (* a (* t -4.0)))
(if (<= t -2.7e-58)
t_2
(if (<= t -1.5e-118)
(* -4.0 (+ (* x i) (* t a)))
(if (<= t 1.95e-230)
t_2
(if (<= t 5.4e-145)
(+ (* i (* x -4.0)) t_1)
(if (<= t 2.6e-12) t_2 t_3))))))))))
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 * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.26e+76) {
tmp = t_3;
} else if (t <= -2e+19) {
tmp = t_2;
} else if (t <= -2.7e-17) {
tmp = t_1 + (a * (t * -4.0));
} else if (t <= -2.7e-58) {
tmp = t_2;
} else if (t <= -1.5e-118) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (t <= 1.95e-230) {
tmp = t_2;
} else if (t <= 5.4e-145) {
tmp = (i * (x * -4.0)) + t_1;
} else if (t <= 2.6e-12) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) + t_1
t_3 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-1.26d+76)) then
tmp = t_3
else if (t <= (-2d+19)) then
tmp = t_2
else if (t <= (-2.7d-17)) then
tmp = t_1 + (a * (t * (-4.0d0)))
else if (t <= (-2.7d-58)) then
tmp = t_2
else if (t <= (-1.5d-118)) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else if (t <= 1.95d-230) then
tmp = t_2
else if (t <= 5.4d-145) then
tmp = (i * (x * (-4.0d0))) + t_1
else if (t <= 2.6d-12) then
tmp = t_2
else
tmp = t_3
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 = j * (k * -27.0);
double t_2 = (b * c) + t_1;
double t_3 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -1.26e+76) {
tmp = t_3;
} else if (t <= -2e+19) {
tmp = t_2;
} else if (t <= -2.7e-17) {
tmp = t_1 + (a * (t * -4.0));
} else if (t <= -2.7e-58) {
tmp = t_2;
} else if (t <= -1.5e-118) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (t <= 1.95e-230) {
tmp = t_2;
} else if (t <= 5.4e-145) {
tmp = (i * (x * -4.0)) + t_1;
} else if (t <= 2.6e-12) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
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 * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -1.26e+76: tmp = t_3 elif t <= -2e+19: tmp = t_2 elif t <= -2.7e-17: tmp = t_1 + (a * (t * -4.0)) elif t <= -2.7e-58: tmp = t_2 elif t <= -1.5e-118: tmp = -4.0 * ((x * i) + (t * a)) elif t <= 1.95e-230: tmp = t_2 elif t <= 5.4e-145: tmp = (i * (x * -4.0)) + t_1 elif t <= 2.6e-12: tmp = t_2 else: tmp = t_3 return tmp
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(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -1.26e+76) tmp = t_3; elseif (t <= -2e+19) tmp = t_2; elseif (t <= -2.7e-17) tmp = Float64(t_1 + Float64(a * Float64(t * -4.0))); elseif (t <= -2.7e-58) tmp = t_2; elseif (t <= -1.5e-118) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); elseif (t <= 1.95e-230) tmp = t_2; elseif (t <= 5.4e-145) tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1); elseif (t <= 2.6e-12) tmp = t_2; else tmp = t_3; end return tmp end
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 * ((18.0 * (x * (y * z))) - (a * 4.0)); tmp = 0.0; if (t <= -1.26e+76) tmp = t_3; elseif (t <= -2e+19) tmp = t_2; elseif (t <= -2.7e-17) tmp = t_1 + (a * (t * -4.0)); elseif (t <= -2.7e-58) tmp = t_2; elseif (t <= -1.5e-118) tmp = -4.0 * ((x * i) + (t * a)); elseif (t <= 1.95e-230) tmp = t_2; elseif (t <= 5.4e-145) tmp = (i * (x * -4.0)) + t_1; elseif (t <= 2.6e-12) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
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[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.26e+76], t$95$3, If[LessEqual[t, -2e+19], t$95$2, If[LessEqual[t, -2.7e-17], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.7e-58], t$95$2, If[LessEqual[t, -1.5e-118], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e-230], t$95$2, If[LessEqual[t, 5.4e-145], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[t, 2.6e-12], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
t_3 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.26 \cdot 10^{+76}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-17}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{-58}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-118}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-230}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-145}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-12}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if t < -1.26000000000000007e76 or 2.59999999999999983e-12 < t Initial program 77.1%
Simplified81.2%
Taylor expanded in t around inf 71.3%
if -1.26000000000000007e76 < t < -2e19 or -2.7000000000000001e-17 < t < -2.6999999999999999e-58 or -1.50000000000000009e-118 < t < 1.9500000000000001e-230 or 5.4000000000000001e-145 < t < 2.59999999999999983e-12Initial program 86.8%
Simplified89.8%
Taylor expanded in b around inf 71.7%
if -2e19 < t < -2.7000000000000001e-17Initial program 99.8%
Simplified100.0%
Taylor expanded in a around inf 85.4%
metadata-eval85.4%
distribute-lft-neg-in85.4%
*-commutative85.4%
associate-*l*85.4%
distribute-lft-neg-in85.4%
distribute-lft-neg-in85.4%
metadata-eval85.4%
Simplified85.4%
if -2.6999999999999999e-58 < t < -1.50000000000000009e-118Initial program 86.7%
Taylor expanded in y around 0 79.3%
distribute-lft-out79.3%
*-commutative79.3%
Simplified79.3%
Taylor expanded in j around 0 71.3%
Taylor expanded in b around 0 61.8%
if 1.9500000000000001e-230 < t < 5.4000000000000001e-145Initial program 79.0%
Simplified86.3%
Taylor expanded in i around inf 86.4%
metadata-eval86.4%
distribute-lft-neg-in86.4%
*-commutative86.4%
associate-*r*86.4%
distribute-rgt-neg-in86.4%
distribute-rgt-neg-in86.4%
metadata-eval86.4%
*-commutative86.4%
Simplified86.4%
Final simplification72.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (- (* b c) (* 4.0 (+ (* x i) (* t a)))))
(t_3 (* x (* y z))))
(if (<= k -1.56e-21)
(+ (* i (* x -4.0)) t_1)
(if (<= k 1.52e-133)
t_2
(if (<= k 6.9e-56)
(* t (- (* 18.0 t_3) (* a 4.0)))
(if (or (<= k 1.3e+147) (and (not (<= k 1.9e+173)) (<= k 2e+189)))
t_2
(+ t_1 (* 18.0 (* t t_3)))))))))
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) - (4.0 * ((x * i) + (t * a)));
double t_3 = x * (y * z);
double tmp;
if (k <= -1.56e-21) {
tmp = (i * (x * -4.0)) + t_1;
} else if (k <= 1.52e-133) {
tmp = t_2;
} else if (k <= 6.9e-56) {
tmp = t * ((18.0 * t_3) - (a * 4.0));
} else if ((k <= 1.3e+147) || (!(k <= 1.9e+173) && (k <= 2e+189))) {
tmp = t_2;
} else {
tmp = t_1 + (18.0 * (t * t_3));
}
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) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (b * c) - (4.0d0 * ((x * i) + (t * a)))
t_3 = x * (y * z)
if (k <= (-1.56d-21)) then
tmp = (i * (x * (-4.0d0))) + t_1
else if (k <= 1.52d-133) then
tmp = t_2
else if (k <= 6.9d-56) then
tmp = t * ((18.0d0 * t_3) - (a * 4.0d0))
else if ((k <= 1.3d+147) .or. (.not. (k <= 1.9d+173)) .and. (k <= 2d+189)) then
tmp = t_2
else
tmp = t_1 + (18.0d0 * (t * t_3))
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 = j * (k * -27.0);
double t_2 = (b * c) - (4.0 * ((x * i) + (t * a)));
double t_3 = x * (y * z);
double tmp;
if (k <= -1.56e-21) {
tmp = (i * (x * -4.0)) + t_1;
} else if (k <= 1.52e-133) {
tmp = t_2;
} else if (k <= 6.9e-56) {
tmp = t * ((18.0 * t_3) - (a * 4.0));
} else if ((k <= 1.3e+147) || (!(k <= 1.9e+173) && (k <= 2e+189))) {
tmp = t_2;
} else {
tmp = t_1 + (18.0 * (t * t_3));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) - (4.0 * ((x * i) + (t * a))) t_3 = x * (y * z) tmp = 0 if k <= -1.56e-21: tmp = (i * (x * -4.0)) + t_1 elif k <= 1.52e-133: tmp = t_2 elif k <= 6.9e-56: tmp = t * ((18.0 * t_3) - (a * 4.0)) elif (k <= 1.3e+147) or (not (k <= 1.9e+173) and (k <= 2e+189)): tmp = t_2 else: tmp = t_1 + (18.0 * (t * t_3)) return tmp
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) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) t_3 = Float64(x * Float64(y * z)) tmp = 0.0 if (k <= -1.56e-21) tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1); elseif (k <= 1.52e-133) tmp = t_2; elseif (k <= 6.9e-56) tmp = Float64(t * Float64(Float64(18.0 * t_3) - Float64(a * 4.0))); elseif ((k <= 1.3e+147) || (!(k <= 1.9e+173) && (k <= 2e+189))) tmp = t_2; else tmp = Float64(t_1 + Float64(18.0 * Float64(t * t_3))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = j * (k * -27.0); t_2 = (b * c) - (4.0 * ((x * i) + (t * a))); t_3 = x * (y * z); tmp = 0.0; if (k <= -1.56e-21) tmp = (i * (x * -4.0)) + t_1; elseif (k <= 1.52e-133) tmp = t_2; elseif (k <= 6.9e-56) tmp = t * ((18.0 * t_3) - (a * 4.0)); elseif ((k <= 1.3e+147) || (~((k <= 1.9e+173)) && (k <= 2e+189))) tmp = t_2; else tmp = t_1 + (18.0 * (t * t_3)); end tmp_2 = tmp; end
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] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.56e-21], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[k, 1.52e-133], t$95$2, If[LessEqual[k, 6.9e-56], N[(t * N[(N[(18.0 * t$95$3), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[k, 1.3e+147], And[N[Not[LessEqual[k, 1.9e+173]], $MachinePrecision], LessEqual[k, 2e+189]]], t$95$2, N[(t$95$1 + N[(18.0 * N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
t_3 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;k \leq -1.56 \cdot 10^{-21}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\
\mathbf{elif}\;k \leq 1.52 \cdot 10^{-133}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;k \leq 6.9 \cdot 10^{-56}:\\
\;\;\;\;t \cdot \left(18 \cdot t\_3 - a \cdot 4\right)\\
\mathbf{elif}\;k \leq 1.3 \cdot 10^{+147} \lor \neg \left(k \leq 1.9 \cdot 10^{+173}\right) \land k \leq 2 \cdot 10^{+189}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + 18 \cdot \left(t \cdot t\_3\right)\\
\end{array}
\end{array}
if k < -1.55999999999999999e-21Initial program 80.4%
Simplified83.6%
Taylor expanded in i around inf 55.0%
metadata-eval55.0%
distribute-lft-neg-in55.0%
*-commutative55.0%
associate-*r*55.0%
distribute-rgt-neg-in55.0%
distribute-rgt-neg-in55.0%
metadata-eval55.0%
*-commutative55.0%
Simplified55.0%
if -1.55999999999999999e-21 < k < 1.52000000000000001e-133 or 6.8999999999999996e-56 < k < 1.2999999999999999e147 or 1.90000000000000005e173 < k < 2e189Initial program 83.9%
Taylor expanded in y around 0 82.4%
distribute-lft-out82.4%
*-commutative82.4%
Simplified82.4%
Taylor expanded in j around 0 77.5%
if 1.52000000000000001e-133 < k < 6.8999999999999996e-56Initial program 99.3%
Simplified99.8%
Taylor expanded in t around inf 72.3%
if 1.2999999999999999e147 < k < 1.90000000000000005e173 or 2e189 < k Initial program 74.6%
Simplified76.8%
Taylor expanded in y around inf 77.3%
Final simplification71.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k)))
(t_2 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -4.5e+170)
t_2
(if (<= x 8.8e+45)
t_1
(if (<= x 1.8e+65)
t_2
(if (<= x 3.3e+106)
(- (* b c) (* 4.0 (+ (* x i) (* t a))))
(if (<= x 2.35e+184)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x 1.12e+204) t_1 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 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -4.5e+170) {
tmp = t_2;
} else if (x <= 8.8e+45) {
tmp = t_1;
} else if (x <= 1.8e+65) {
tmp = t_2;
} else if (x <= 3.3e+106) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else if (x <= 2.35e+184) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 1.12e+204) {
tmp = t_1;
} 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 = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
t_2 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-4.5d+170)) then
tmp = t_2
else if (x <= 8.8d+45) then
tmp = t_1
else if (x <= 1.8d+65) then
tmp = t_2
else if (x <= 3.3d+106) then
tmp = (b * c) - (4.0d0 * ((x * i) + (t * a)))
else if (x <= 2.35d+184) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= 1.12d+204) then
tmp = t_1
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 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
double t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -4.5e+170) {
tmp = t_2;
} else if (x <= 8.8e+45) {
tmp = t_1;
} else if (x <= 1.8e+65) {
tmp = t_2;
} else if (x <= 3.3e+106) {
tmp = (b * c) - (4.0 * ((x * i) + (t * a)));
} else if (x <= 2.35e+184) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= 1.12e+204) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -4.5e+170: tmp = t_2 elif x <= 8.8e+45: tmp = t_1 elif x <= 1.8e+65: tmp = t_2 elif x <= 3.3e+106: tmp = (b * c) - (4.0 * ((x * i) + (t * a))) elif x <= 2.35e+184: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= 1.12e+204: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)) t_2 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -4.5e+170) tmp = t_2; elseif (x <= 8.8e+45) tmp = t_1; elseif (x <= 1.8e+65) tmp = t_2; elseif (x <= 3.3e+106) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))); elseif (x <= 2.35e+184) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= 1.12e+204) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k); t_2 = x * ((18.0 * (z * (y * t))) + (i * -4.0)); tmp = 0.0; if (x <= -4.5e+170) tmp = t_2; elseif (x <= 8.8e+45) tmp = t_1; elseif (x <= 1.8e+65) tmp = t_2; elseif (x <= 3.3e+106) tmp = (b * c) - (4.0 * ((x * i) + (t * a))); elseif (x <= 2.35e+184) tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)); elseif (x <= 1.12e+204) tmp = t_1; 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[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+170], t$95$2, If[LessEqual[x, 8.8e+45], t$95$1, If[LessEqual[x, 1.8e+65], t$95$2, If[LessEqual[x, 3.3e+106], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.35e+184], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.12e+204], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+170}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 8.8 \cdot 10^{+45}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+65}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+106}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{+184}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{+204}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -4.50000000000000022e170 or 8.8000000000000001e45 < x < 1.79999999999999989e65 or 1.11999999999999996e204 < x Initial program 63.2%
Simplified74.9%
Taylor expanded in y around inf 63.5%
Taylor expanded in x around inf 75.6%
cancel-sign-sub-inv75.6%
metadata-eval75.6%
associate-*r*78.9%
Simplified78.9%
if -4.50000000000000022e170 < x < 8.8000000000000001e45 or 2.3500000000000002e184 < x < 1.11999999999999996e204Initial program 90.2%
Taylor expanded in x around 0 79.2%
if 1.79999999999999989e65 < x < 3.30000000000000008e106Initial program 90.0%
Taylor expanded in y around 0 100.0%
distribute-lft-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in j around 0 100.0%
if 3.30000000000000008e106 < x < 2.3500000000000002e184Initial program 69.7%
Simplified73.9%
Taylor expanded in t around inf 66.0%
Final simplification78.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (or (<= t_1 -5e+125) (not (<= t_1 5e+136)))
(* y (+ (* -27.0 (/ (* j k) y)) (* 18.0 (* t (* x z)))))
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -5e+125) || !(t_1 <= 5e+136)) {
tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
}
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) :: tmp
t_1 = (j * 27.0d0) * k
if ((t_1 <= (-5d+125)) .or. (.not. (t_1 <= 5d+136))) then
tmp = y * (((-27.0d0) * ((j * k) / y)) + (18.0d0 * (t * (x * z))))
else
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
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 = (j * 27.0) * k;
double tmp;
if ((t_1 <= -5e+125) || !(t_1 <= 5e+136)) {
tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z))));
} else {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if (t_1 <= -5e+125) or not (t_1 <= 5e+136): tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z)))) else: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if ((t_1 <= -5e+125) || !(t_1 <= 5e+136)) tmp = Float64(y * Float64(Float64(-27.0 * Float64(Float64(j * k) / y)) + Float64(18.0 * Float64(t * Float64(x * z))))); 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
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; tmp = 0.0; if ((t_1 <= -5e+125) || ~((t_1 <= 5e+136))) tmp = y * ((-27.0 * ((j * k) / y)) + (18.0 * (t * (x * z)))); else tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+125], N[Not[LessEqual[t$95$1, 5e+136]], $MachinePrecision]], N[(y * N[(N[(-27.0 * N[(N[(j * k), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(18.0 * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+125} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+136}\right):\\
\;\;\;\;y \cdot \left(-27 \cdot \frac{j \cdot k}{y} + 18 \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\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 (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.99999999999999962e125 or 5.0000000000000002e136 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 74.5%
Simplified73.5%
Taylor expanded in y around inf 74.9%
Taylor expanded in y around inf 74.9%
if -4.99999999999999962e125 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 5.0000000000000002e136Initial program 85.5%
Simplified91.6%
Taylor expanded in j around 0 84.2%
Final simplification81.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(t_2 (- (- (* b c) (* 4.0 (+ (* x i) (* t a)))) (* (* j 27.0) k))))
(if (<= z -480000000.0)
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))
(if (<= z 5.6e+32)
t_2
(if (<= z 4.8e+77) (+ (* b c) t_1) (if (<= z 2.6e+205) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
double tmp;
if (z <= -480000000.0) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (z <= 5.6e+32) {
tmp = t_2;
} else if (z <= 4.8e+77) {
tmp = (b * c) + t_1;
} else if (z <= 2.6e+205) {
tmp = t_2;
} else {
tmp = t_1;
}
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 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
t_2 = ((b * c) - (4.0d0 * ((x * i) + (t * a)))) - ((j * 27.0d0) * k)
if (z <= (-480000000.0d0)) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else if (z <= 5.6d+32) then
tmp = t_2
else if (z <= 4.8d+77) then
tmp = (b * c) + t_1
else if (z <= 2.6d+205) then
tmp = t_2
else
tmp = t_1
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 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double t_2 = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k);
double tmp;
if (z <= -480000000.0) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else if (z <= 5.6e+32) {
tmp = t_2;
} else if (z <= 4.8e+77) {
tmp = (b * c) + t_1;
} else if (z <= 2.6e+205) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) t_2 = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k) tmp = 0 if z <= -480000000.0: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) elif z <= 5.6e+32: tmp = t_2 elif z <= 4.8e+77: tmp = (b * c) + t_1 elif z <= 2.6e+205: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) t_2 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (z <= -480000000.0) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); elseif (z <= 5.6e+32) tmp = t_2; elseif (z <= 4.8e+77) tmp = Float64(Float64(b * c) + t_1); elseif (z <= 2.6e+205) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)); t_2 = ((b * c) - (4.0 * ((x * i) + (t * a)))) - ((j * 27.0) * k); tmp = 0.0; if (z <= -480000000.0) tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)); elseif (z <= 5.6e+32) tmp = t_2; elseif (z <= 4.8e+77) tmp = (b * c) + t_1; elseif (z <= 2.6e+205) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -480000000.0], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e+32], t$95$2, If[LessEqual[z, 4.8e+77], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 2.6e+205], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
t_2 := \left(b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;z \leq -480000000:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+32}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+77}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+205}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8e8Initial program 81.8%
Simplified77.7%
Taylor expanded in y around inf 60.3%
Taylor expanded in x around inf 54.0%
cancel-sign-sub-inv54.0%
metadata-eval54.0%
associate-*r*56.8%
Simplified56.8%
if -4.8e8 < z < 5.6e32 or 4.7999999999999997e77 < z < 2.5999999999999999e205Initial program 83.3%
Taylor expanded in y around 0 86.5%
distribute-lft-out86.5%
*-commutative86.5%
Simplified86.5%
if 5.6e32 < z < 4.7999999999999997e77Initial program 66.4%
Simplified66.4%
Taylor expanded in j around 0 66.4%
Taylor expanded in i around 0 83.1%
if 2.5999999999999999e205 < z Initial program 78.7%
Simplified84.0%
Taylor expanded in t around inf 79.2%
Final simplification77.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (- (* b c) (* 4.0 (+ (* x i) (* t a))))))
(if (<= k -6.6e-22)
(+ (* i (* x -4.0)) t_1)
(if (<= k 1.15e-133)
t_2
(if (<= k 2.6e-56)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= k 7.5e+177) t_2 (+ t_1 (* a (* t -4.0)))))))))
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) - (4.0 * ((x * i) + (t * a)));
double tmp;
if (k <= -6.6e-22) {
tmp = (i * (x * -4.0)) + t_1;
} else if (k <= 1.15e-133) {
tmp = t_2;
} else if (k <= 2.6e-56) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (k <= 7.5e+177) {
tmp = t_2;
} else {
tmp = t_1 + (a * (t * -4.0));
}
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 = j * (k * (-27.0d0))
t_2 = (b * c) - (4.0d0 * ((x * i) + (t * a)))
if (k <= (-6.6d-22)) then
tmp = (i * (x * (-4.0d0))) + t_1
else if (k <= 1.15d-133) then
tmp = t_2
else if (k <= 2.6d-56) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (k <= 7.5d+177) then
tmp = t_2
else
tmp = t_1 + (a * (t * (-4.0d0)))
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 = j * (k * -27.0);
double t_2 = (b * c) - (4.0 * ((x * i) + (t * a)));
double tmp;
if (k <= -6.6e-22) {
tmp = (i * (x * -4.0)) + t_1;
} else if (k <= 1.15e-133) {
tmp = t_2;
} else if (k <= 2.6e-56) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (k <= 7.5e+177) {
tmp = t_2;
} else {
tmp = t_1 + (a * (t * -4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) - (4.0 * ((x * i) + (t * a))) tmp = 0 if k <= -6.6e-22: tmp = (i * (x * -4.0)) + t_1 elif k <= 1.15e-133: tmp = t_2 elif k <= 2.6e-56: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif k <= 7.5e+177: tmp = t_2 else: tmp = t_1 + (a * (t * -4.0)) return tmp
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) - Float64(4.0 * Float64(Float64(x * i) + Float64(t * a)))) tmp = 0.0 if (k <= -6.6e-22) tmp = Float64(Float64(i * Float64(x * -4.0)) + t_1); elseif (k <= 1.15e-133) tmp = t_2; elseif (k <= 2.6e-56) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (k <= 7.5e+177) tmp = t_2; else tmp = Float64(t_1 + Float64(a * Float64(t * -4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = j * (k * -27.0); t_2 = (b * c) - (4.0 * ((x * i) + (t * a))); tmp = 0.0; if (k <= -6.6e-22) tmp = (i * (x * -4.0)) + t_1; elseif (k <= 1.15e-133) tmp = t_2; elseif (k <= 2.6e-56) tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)); elseif (k <= 7.5e+177) tmp = t_2; else tmp = t_1 + (a * (t * -4.0)); end tmp_2 = tmp; end
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] - N[(4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -6.6e-22], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[k, 1.15e-133], t$95$2, If[LessEqual[k, 2.6e-56], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.5e+177], t$95$2, N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;k \leq -6.6 \cdot 10^{-22}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_1\\
\mathbf{elif}\;k \leq 1.15 \cdot 10^{-133}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;k \leq 2.6 \cdot 10^{-56}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;k \leq 7.5 \cdot 10^{+177}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\
\end{array}
\end{array}
if k < -6.6000000000000002e-22Initial program 80.4%
Simplified83.6%
Taylor expanded in i around inf 55.0%
metadata-eval55.0%
distribute-lft-neg-in55.0%
*-commutative55.0%
associate-*r*55.0%
distribute-rgt-neg-in55.0%
distribute-rgt-neg-in55.0%
metadata-eval55.0%
*-commutative55.0%
Simplified55.0%
if -6.6000000000000002e-22 < k < 1.15e-133 or 2.59999999999999997e-56 < k < 7.50000000000000039e177Initial program 83.5%
Taylor expanded in y around 0 81.4%
distribute-lft-out81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in j around 0 74.7%
if 1.15e-133 < k < 2.59999999999999997e-56Initial program 99.3%
Simplified99.8%
Taylor expanded in t around inf 72.3%
if 7.50000000000000039e177 < k Initial program 73.8%
Simplified76.5%
Taylor expanded in a around inf 59.0%
metadata-eval59.0%
distribute-lft-neg-in59.0%
*-commutative59.0%
associate-*l*59.0%
distribute-lft-neg-in59.0%
distribute-lft-neg-in59.0%
metadata-eval59.0%
Simplified59.0%
Final simplification67.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
(if (<= t -1.6e+77)
t_2
(if (<= t -8.5e-111)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= t 2.9e-52) (- (- (* b c) (* 4.0 (* x i))) t_1) 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 = (j * 27.0) * k;
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -1.6e+77) {
tmp = t_2;
} else if (t <= -8.5e-111) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.9e-52) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} 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 = (j * 27.0d0) * k
t_2 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
if (t <= (-1.6d+77)) then
tmp = t_2
else if (t <= (-8.5d-111)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (t <= 2.9d-52) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
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 = (j * 27.0) * k;
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (t <= -1.6e+77) {
tmp = t_2;
} else if (t <= -8.5e-111) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.9e-52) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) tmp = 0 if t <= -1.6e+77: tmp = t_2 elif t <= -8.5e-111: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif t <= 2.9e-52: tmp = ((b * c) - (4.0 * (x * i))) - t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) tmp = 0.0 if (t <= -1.6e+77) tmp = t_2; elseif (t <= -8.5e-111) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t <= 2.9e-52) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))); tmp = 0.0; if (t <= -1.6e+77) tmp = t_2; elseif (t <= -8.5e-111) tmp = ((b * c) - (4.0 * (t * a))) - t_1; elseif (t <= 2.9e-52) tmp = ((b * c) - (4.0 * (x * i))) - t_1; 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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = 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]}, If[LessEqual[t, -1.6e+77], t$95$2, If[LessEqual[t, -8.5e-111], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.9e-52], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-111}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{-52}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.6000000000000001e77 or 2.9000000000000002e-52 < t Initial program 77.4%
Simplified81.2%
Taylor expanded in j around 0 73.9%
Taylor expanded in i around 0 72.6%
if -1.6000000000000001e77 < t < -8.5000000000000003e-111Initial program 85.7%
Taylor expanded in x around 0 71.1%
if -8.5000000000000003e-111 < t < 2.9000000000000002e-52Initial program 88.2%
Taylor expanded in t around 0 93.6%
Final simplification78.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= t -5.4e+76)
t_2
(if (<= t -3.6e-113)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= t 2.6e-20) (- (- (* b c) (* 4.0 (* x i))) t_1) 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 = (j * 27.0) * k;
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.4e+76) {
tmp = t_2;
} else if (t <= -3.6e-113) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.6e-20) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} 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 = (j * 27.0d0) * k
t_2 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (t <= (-5.4d+76)) then
tmp = t_2
else if (t <= (-3.6d-113)) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (t <= 2.6d-20) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
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 = (j * 27.0) * k;
double t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (t <= -5.4e+76) {
tmp = t_2;
} else if (t <= -3.6e-113) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 2.6e-20) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if t <= -5.4e+76: tmp = t_2 elif t <= -3.6e-113: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif t <= 2.6e-20: tmp = ((b * c) - (4.0 * (x * i))) - t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (t <= -5.4e+76) tmp = t_2; elseif (t <= -3.6e-113) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t <= 2.6e-20) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; t_2 = t * ((18.0 * (x * (y * z))) - (a * 4.0)); tmp = 0.0; if (t <= -5.4e+76) tmp = t_2; elseif (t <= -3.6e-113) tmp = ((b * c) - (4.0 * (t * a))) - t_1; elseif (t <= 2.6e-20) tmp = ((b * c) - (4.0 * (x * i))) - t_1; 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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.4e+76], t$95$2, If[LessEqual[t, -3.6e-113], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 2.6e-20], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;t \leq -5.4 \cdot 10^{+76}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-113}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-20}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.3999999999999998e76 or 2.59999999999999995e-20 < t Initial program 77.1%
Simplified81.2%
Taylor expanded in t around inf 71.3%
if -5.3999999999999998e76 < t < -3.59999999999999975e-113Initial program 85.7%
Taylor expanded in x around 0 71.1%
if -3.59999999999999975e-113 < t < 2.59999999999999995e-20Initial program 87.3%
Taylor expanded in t around 0 89.7%
Final simplification77.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))) (t_2 (* -27.0 (* j k))))
(if (<= k -1.56e-21)
t_2
(if (<= k 1020000000.0)
t_1
(if (<= k 1e+176)
(* -4.0 (+ (* x i) (* t a)))
(if (<= k 6.2e+188) t_1 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 = (b * c) + (-4.0 * (t * a));
double t_2 = -27.0 * (j * k);
double tmp;
if (k <= -1.56e-21) {
tmp = t_2;
} else if (k <= 1020000000.0) {
tmp = t_1;
} else if (k <= 1e+176) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (k <= 6.2e+188) {
tmp = t_1;
} 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 = (b * c) + ((-4.0d0) * (t * a))
t_2 = (-27.0d0) * (j * k)
if (k <= (-1.56d-21)) then
tmp = t_2
else if (k <= 1020000000.0d0) then
tmp = t_1
else if (k <= 1d+176) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else if (k <= 6.2d+188) then
tmp = t_1
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 = (b * c) + (-4.0 * (t * a));
double t_2 = -27.0 * (j * k);
double tmp;
if (k <= -1.56e-21) {
tmp = t_2;
} else if (k <= 1020000000.0) {
tmp = t_1;
} else if (k <= 1e+176) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (k <= 6.2e+188) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) t_2 = -27.0 * (j * k) tmp = 0 if k <= -1.56e-21: tmp = t_2 elif k <= 1020000000.0: tmp = t_1 elif k <= 1e+176: tmp = -4.0 * ((x * i) + (t * a)) elif k <= 6.2e+188: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(-27.0 * Float64(j * k)) tmp = 0.0 if (k <= -1.56e-21) tmp = t_2; elseif (k <= 1020000000.0) tmp = t_1; elseif (k <= 1e+176) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); elseif (k <= 6.2e+188) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (b * c) + (-4.0 * (t * a)); t_2 = -27.0 * (j * k); tmp = 0.0; if (k <= -1.56e-21) tmp = t_2; elseif (k <= 1020000000.0) tmp = t_1; elseif (k <= 1e+176) tmp = -4.0 * ((x * i) + (t * a)); elseif (k <= 6.2e+188) tmp = t_1; 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[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -1.56e-21], t$95$2, If[LessEqual[k, 1020000000.0], t$95$1, If[LessEqual[k, 1e+176], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.2e+188], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;k \leq -1.56 \cdot 10^{-21}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;k \leq 1020000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;k \leq 10^{+176}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;k \leq 6.2 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if k < -1.55999999999999999e-21 or 6.2000000000000004e188 < k Initial program 78.0%
Simplified81.0%
Taylor expanded in j around inf 47.9%
if -1.55999999999999999e-21 < k < 1.02e9 or 1e176 < k < 6.2000000000000004e188Initial program 84.2%
Simplified91.2%
Taylor expanded in j around 0 85.5%
Taylor expanded in x around 0 58.6%
if 1.02e9 < k < 1e176Initial program 87.1%
Taylor expanded in y around 0 82.3%
distribute-lft-out82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in j around 0 65.9%
Taylor expanded in b around 0 53.6%
Final simplification53.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))) (t_2 (* j (* k -27.0))))
(if (<= a -1.4e+87)
t_1
(if (<= a -6.5e-17)
(+ (* i (* x -4.0)) t_2)
(if (<= a 7.5e-253)
(+ (* b c) t_2)
(if (<= a 1.25e+73) (- (* b c) (* 4.0 (* x i))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = j * (k * -27.0);
double tmp;
if (a <= -1.4e+87) {
tmp = t_1;
} else if (a <= -6.5e-17) {
tmp = (i * (x * -4.0)) + t_2;
} else if (a <= 7.5e-253) {
tmp = (b * c) + t_2;
} else if (a <= 1.25e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
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 = (b * c) + ((-4.0d0) * (t * a))
t_2 = j * (k * (-27.0d0))
if (a <= (-1.4d+87)) then
tmp = t_1
else if (a <= (-6.5d-17)) then
tmp = (i * (x * (-4.0d0))) + t_2
else if (a <= 7.5d-253) then
tmp = (b * c) + t_2
else if (a <= 1.25d+73) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = t_1
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 = (b * c) + (-4.0 * (t * a));
double t_2 = j * (k * -27.0);
double tmp;
if (a <= -1.4e+87) {
tmp = t_1;
} else if (a <= -6.5e-17) {
tmp = (i * (x * -4.0)) + t_2;
} else if (a <= 7.5e-253) {
tmp = (b * c) + t_2;
} else if (a <= 1.25e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) t_2 = j * (k * -27.0) tmp = 0 if a <= -1.4e+87: tmp = t_1 elif a <= -6.5e-17: tmp = (i * (x * -4.0)) + t_2 elif a <= 7.5e-253: tmp = (b * c) + t_2 elif a <= 1.25e+73: tmp = (b * c) - (4.0 * (x * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (a <= -1.4e+87) tmp = t_1; elseif (a <= -6.5e-17) tmp = Float64(Float64(i * Float64(x * -4.0)) + t_2); elseif (a <= 7.5e-253) tmp = Float64(Float64(b * c) + t_2); elseif (a <= 1.25e+73) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (b * c) + (-4.0 * (t * a)); t_2 = j * (k * -27.0); tmp = 0.0; if (a <= -1.4e+87) tmp = t_1; elseif (a <= -6.5e-17) tmp = (i * (x * -4.0)) + t_2; elseif (a <= 7.5e-253) tmp = (b * c) + t_2; elseif (a <= 1.25e+73) tmp = (b * c) - (4.0 * (x * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.4e+87], t$95$1, If[LessEqual[a, -6.5e-17], N[(N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[a, 7.5e-253], N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[a, 1.25e+73], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{+87}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-17}:\\
\;\;\;\;i \cdot \left(x \cdot -4\right) + t\_2\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-253}:\\
\;\;\;\;b \cdot c + t\_2\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.40000000000000008e87 or 1.24999999999999994e73 < a Initial program 81.8%
Simplified85.2%
Taylor expanded in j around 0 76.1%
Taylor expanded in x around 0 65.2%
if -1.40000000000000008e87 < a < -6.4999999999999996e-17Initial program 81.7%
Simplified87.3%
Taylor expanded in i around inf 63.0%
metadata-eval63.0%
distribute-lft-neg-in63.0%
*-commutative63.0%
associate-*r*63.0%
distribute-rgt-neg-in63.0%
distribute-rgt-neg-in63.0%
metadata-eval63.0%
*-commutative63.0%
Simplified63.0%
if -6.4999999999999996e-17 < a < 7.49999999999999987e-253Initial program 82.9%
Simplified89.5%
Taylor expanded in b around inf 60.3%
if 7.49999999999999987e-253 < a < 1.24999999999999994e73Initial program 81.8%
Simplified84.5%
Taylor expanded in j around 0 76.9%
Taylor expanded in t around 0 55.1%
Final simplification60.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* x i) (* t a)))))
(if (<= a -8.1e-16)
t_1
(if (<= a 4.6e-79)
(+ (* b c) (* j (* k -27.0)))
(if (<= a 2.5e+36) t_1 (+ (* b c) (* -4.0 (* t a))))))))
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) + (t * a));
double tmp;
if (a <= -8.1e-16) {
tmp = t_1;
} else if (a <= 4.6e-79) {
tmp = (b * c) + (j * (k * -27.0));
} else if (a <= 2.5e+36) {
tmp = t_1;
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
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) :: tmp
t_1 = (-4.0d0) * ((x * i) + (t * a))
if (a <= (-8.1d-16)) then
tmp = t_1
else if (a <= 4.6d-79) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (a <= 2.5d+36) then
tmp = t_1
else
tmp = (b * c) + ((-4.0d0) * (t * a))
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 = -4.0 * ((x * i) + (t * a));
double tmp;
if (a <= -8.1e-16) {
tmp = t_1;
} else if (a <= 4.6e-79) {
tmp = (b * c) + (j * (k * -27.0));
} else if (a <= 2.5e+36) {
tmp = t_1;
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((x * i) + (t * a)) tmp = 0 if a <= -8.1e-16: tmp = t_1 elif a <= 4.6e-79: tmp = (b * c) + (j * (k * -27.0)) elif a <= 2.5e+36: tmp = t_1 else: tmp = (b * c) + (-4.0 * (t * a)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))) tmp = 0.0 if (a <= -8.1e-16) tmp = t_1; elseif (a <= 4.6e-79) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (a <= 2.5e+36) tmp = t_1; else tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -4.0 * ((x * i) + (t * a)); tmp = 0.0; if (a <= -8.1e-16) tmp = t_1; elseif (a <= 4.6e-79) tmp = (b * c) + (j * (k * -27.0)); elseif (a <= 2.5e+36) tmp = t_1; else tmp = (b * c) + (-4.0 * (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.1e-16], t$95$1, If[LessEqual[a, 4.6e-79], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+36], t$95$1, N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{if}\;a \leq -8.1 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-79}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if a < -8.10000000000000047e-16 or 4.60000000000000023e-79 < a < 2.49999999999999988e36Initial program 77.3%
Taylor expanded in y around 0 76.1%
distribute-lft-out76.1%
*-commutative76.1%
Simplified76.1%
Taylor expanded in j around 0 64.7%
Taylor expanded in b around 0 54.5%
if -8.10000000000000047e-16 < a < 4.60000000000000023e-79Initial program 86.3%
Simplified90.0%
Taylor expanded in b around inf 55.8%
if 2.49999999999999988e36 < a Initial program 81.6%
Simplified86.6%
Taylor expanded in j around 0 77.4%
Taylor expanded in x around 0 67.0%
Final simplification57.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= a -2e-16)
(* -4.0 (+ (* x i) (* t a)))
(if (<= a 8.2e-253)
(+ (* b c) (* j (* k -27.0)))
(if (<= a 1.55e+73)
(- (* b c) (* 4.0 (* x i)))
(+ (* b c) (* -4.0 (* t a)))))))
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 (a <= -2e-16) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (a <= 8.2e-253) {
tmp = (b * c) + (j * (k * -27.0));
} else if (a <= 1.55e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
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) :: tmp
if (a <= (-2d-16)) then
tmp = (-4.0d0) * ((x * i) + (t * a))
else if (a <= 8.2d-253) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (a <= 1.55d+73) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (b * c) + ((-4.0d0) * (t * a))
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 tmp;
if (a <= -2e-16) {
tmp = -4.0 * ((x * i) + (t * a));
} else if (a <= 8.2e-253) {
tmp = (b * c) + (j * (k * -27.0));
} else if (a <= 1.55e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if a <= -2e-16: tmp = -4.0 * ((x * i) + (t * a)) elif a <= 8.2e-253: tmp = (b * c) + (j * (k * -27.0)) elif a <= 1.55e+73: tmp = (b * c) - (4.0 * (x * i)) else: tmp = (b * c) + (-4.0 * (t * a)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (a <= -2e-16) tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); elseif (a <= 8.2e-253) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (a <= 1.55e+73) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (a <= -2e-16) tmp = -4.0 * ((x * i) + (t * a)); elseif (a <= 8.2e-253) tmp = (b * c) + (j * (k * -27.0)); elseif (a <= 1.55e+73) tmp = (b * c) - (4.0 * (x * i)); else tmp = (b * c) + (-4.0 * (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[a, -2e-16], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e-253], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+73], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-16}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-253}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if a < -2e-16Initial program 80.6%
Taylor expanded in y around 0 80.3%
distribute-lft-out80.3%
*-commutative80.3%
Simplified80.3%
Taylor expanded in j around 0 62.7%
Taylor expanded in b around 0 53.6%
if -2e-16 < a < 8.20000000000000004e-253Initial program 82.9%
Simplified89.5%
Taylor expanded in b around inf 60.3%
if 8.20000000000000004e-253 < a < 1.55e73Initial program 81.8%
Simplified84.5%
Taylor expanded in j around 0 76.9%
Taylor expanded in t around 0 55.1%
if 1.55e73 < a Initial program 83.2%
Simplified86.9%
Taylor expanded in j around 0 78.5%
Taylor expanded in x around 0 68.8%
Final simplification59.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= a -1.45e-39)
(+ t_1 (* a (* t -4.0)))
(if (<= a 2.45e-261)
(+ (* b c) t_1)
(if (<= a 1.55e+73)
(- (* b c) (* 4.0 (* x i)))
(+ (* b c) (* -4.0 (* t a))))))))
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 tmp;
if (a <= -1.45e-39) {
tmp = t_1 + (a * (t * -4.0));
} else if (a <= 2.45e-261) {
tmp = (b * c) + t_1;
} else if (a <= 1.55e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
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) :: tmp
t_1 = j * (k * (-27.0d0))
if (a <= (-1.45d-39)) then
tmp = t_1 + (a * (t * (-4.0d0)))
else if (a <= 2.45d-261) then
tmp = (b * c) + t_1
else if (a <= 1.55d+73) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (b * c) + ((-4.0d0) * (t * a))
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 = j * (k * -27.0);
double tmp;
if (a <= -1.45e-39) {
tmp = t_1 + (a * (t * -4.0));
} else if (a <= 2.45e-261) {
tmp = (b * c) + t_1;
} else if (a <= 1.55e+73) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = (b * c) + (-4.0 * (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if a <= -1.45e-39: tmp = t_1 + (a * (t * -4.0)) elif a <= 2.45e-261: tmp = (b * c) + t_1 elif a <= 1.55e+73: tmp = (b * c) - (4.0 * (x * i)) else: tmp = (b * c) + (-4.0 * (t * a)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (a <= -1.45e-39) tmp = Float64(t_1 + Float64(a * Float64(t * -4.0))); elseif (a <= 2.45e-261) tmp = Float64(Float64(b * c) + t_1); elseif (a <= 1.55e+73) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = j * (k * -27.0); tmp = 0.0; if (a <= -1.45e-39) tmp = t_1 + (a * (t * -4.0)); elseif (a <= 2.45e-261) tmp = (b * c) + t_1; elseif (a <= 1.55e+73) tmp = (b * c) - (4.0 * (x * i)); else tmp = (b * c) + (-4.0 * (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.45e-39], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.45e-261], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[a, 1.55e+73], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{-39}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{-261}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\end{array}
\end{array}
if a < -1.44999999999999994e-39Initial program 76.9%
Simplified83.1%
Taylor expanded in a around inf 62.5%
metadata-eval62.5%
distribute-lft-neg-in62.5%
*-commutative62.5%
associate-*l*62.5%
distribute-lft-neg-in62.5%
distribute-lft-neg-in62.5%
metadata-eval62.5%
Simplified62.5%
if -1.44999999999999994e-39 < a < 2.45000000000000002e-261Initial program 86.6%
Simplified92.6%
Taylor expanded in b around inf 63.4%
if 2.45000000000000002e-261 < a < 1.55e73Initial program 81.8%
Simplified84.5%
Taylor expanded in j around 0 76.9%
Taylor expanded in t around 0 55.1%
if 1.55e73 < a Initial program 83.2%
Simplified86.9%
Taylor expanded in j around 0 78.5%
Taylor expanded in x around 0 68.8%
Final simplification62.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= a -6.8e+71)
t_1
(if (<= a 4.5e-199) (* -27.0 (* j k)) (if (<= a 5.4e+73) (* b c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if (a <= -6.8e+71) {
tmp = t_1;
} else if (a <= 4.5e-199) {
tmp = -27.0 * (j * k);
} else if (a <= 5.4e+73) {
tmp = b * c;
} else {
tmp = t_1;
}
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) :: tmp
t_1 = t * (a * (-4.0d0))
if (a <= (-6.8d+71)) then
tmp = t_1
else if (a <= 4.5d-199) then
tmp = (-27.0d0) * (j * k)
else if (a <= 5.4d+73) then
tmp = b * c
else
tmp = t_1
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 = t * (a * -4.0);
double tmp;
if (a <= -6.8e+71) {
tmp = t_1;
} else if (a <= 4.5e-199) {
tmp = -27.0 * (j * k);
} else if (a <= 5.4e+73) {
tmp = b * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if a <= -6.8e+71: tmp = t_1 elif a <= 4.5e-199: tmp = -27.0 * (j * k) elif a <= 5.4e+73: tmp = b * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (a <= -6.8e+71) tmp = t_1; elseif (a <= 4.5e-199) tmp = Float64(-27.0 * Float64(j * k)); elseif (a <= 5.4e+73) tmp = Float64(b * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (a * -4.0); tmp = 0.0; if (a <= -6.8e+71) tmp = t_1; elseif (a <= 4.5e-199) tmp = -27.0 * (j * k); elseif (a <= 5.4e+73) tmp = b * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.8e+71], t$95$1, If[LessEqual[a, 4.5e-199], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.4e+73], N[(b * c), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;a \leq -6.8 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-199}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{+73}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.7999999999999997e71 or 5.3999999999999998e73 < a Initial program 81.0%
Simplified85.3%
Taylor expanded in j around 0 76.3%
Taylor expanded in a around inf 53.9%
*-commutative53.9%
*-commutative53.9%
associate-*l*53.9%
Simplified53.9%
if -6.7999999999999997e71 < a < 4.49999999999999998e-199Initial program 85.4%
Simplified90.3%
Taylor expanded in j around inf 38.0%
if 4.49999999999999998e-199 < a < 5.3999999999999998e73Initial program 78.2%
Simplified81.4%
Taylor expanded in y around inf 73.5%
Taylor expanded in b around inf 30.9%
Final simplification42.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= a -9.5e+69)
t_1
(if (<= a 9.6e-256)
(* -27.0 (* j k))
(if (<= a 1.12e+73) (* x (* i -4.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if (a <= -9.5e+69) {
tmp = t_1;
} else if (a <= 9.6e-256) {
tmp = -27.0 * (j * k);
} else if (a <= 1.12e+73) {
tmp = x * (i * -4.0);
} else {
tmp = t_1;
}
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) :: tmp
t_1 = t * (a * (-4.0d0))
if (a <= (-9.5d+69)) then
tmp = t_1
else if (a <= 9.6d-256) then
tmp = (-27.0d0) * (j * k)
else if (a <= 1.12d+73) then
tmp = x * (i * (-4.0d0))
else
tmp = t_1
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 = t * (a * -4.0);
double tmp;
if (a <= -9.5e+69) {
tmp = t_1;
} else if (a <= 9.6e-256) {
tmp = -27.0 * (j * k);
} else if (a <= 1.12e+73) {
tmp = x * (i * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if a <= -9.5e+69: tmp = t_1 elif a <= 9.6e-256: tmp = -27.0 * (j * k) elif a <= 1.12e+73: tmp = x * (i * -4.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (a <= -9.5e+69) tmp = t_1; elseif (a <= 9.6e-256) tmp = Float64(-27.0 * Float64(j * k)); elseif (a <= 1.12e+73) tmp = Float64(x * Float64(i * -4.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (a * -4.0); tmp = 0.0; if (a <= -9.5e+69) tmp = t_1; elseif (a <= 9.6e-256) tmp = -27.0 * (j * k); elseif (a <= 1.12e+73) tmp = x * (i * -4.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.5e+69], t$95$1, If[LessEqual[a, 9.6e-256], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.12e+73], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{+69}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{-256}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;a \leq 1.12 \cdot 10^{+73}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.4999999999999995e69 or 1.12e73 < a Initial program 81.0%
Simplified85.3%
Taylor expanded in j around 0 76.3%
Taylor expanded in a around inf 53.9%
*-commutative53.9%
*-commutative53.9%
associate-*l*53.9%
Simplified53.9%
if -9.4999999999999995e69 < a < 9.5999999999999998e-256Initial program 83.5%
Simplified89.0%
Taylor expanded in j around inf 41.0%
if 9.5999999999999998e-256 < a < 1.12e73Initial program 81.8%
Simplified84.5%
Taylor expanded in y around inf 76.7%
Taylor expanded in i around inf 30.5%
*-commutative30.5%
*-commutative30.5%
associate-*l*30.5%
*-commutative30.5%
Simplified30.5%
Final simplification42.8%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= k -2.55e-14) (not (<= k 1.2e+189))) (* -27.0 (* j k)) (* -4.0 (+ (* x i) (* t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -2.55e-14) || !(k <= 1.2e+189)) {
tmp = -27.0 * (j * k);
} else {
tmp = -4.0 * ((x * i) + (t * a));
}
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) :: tmp
if ((k <= (-2.55d-14)) .or. (.not. (k <= 1.2d+189))) then
tmp = (-27.0d0) * (j * k)
else
tmp = (-4.0d0) * ((x * i) + (t * a))
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 tmp;
if ((k <= -2.55e-14) || !(k <= 1.2e+189)) {
tmp = -27.0 * (j * k);
} else {
tmp = -4.0 * ((x * i) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -2.55e-14) or not (k <= 1.2e+189): tmp = -27.0 * (j * k) else: tmp = -4.0 * ((x * i) + (t * a)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -2.55e-14) || !(k <= 1.2e+189)) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(-4.0 * Float64(Float64(x * i) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((k <= -2.55e-14) || ~((k <= 1.2e+189))) tmp = -27.0 * (j * k); else tmp = -4.0 * ((x * i) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -2.55e-14], N[Not[LessEqual[k, 1.2e+189]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(x * i), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.55 \cdot 10^{-14} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(x \cdot i + t \cdot a\right)\\
\end{array}
\end{array}
if k < -2.5499999999999999e-14 or 1.2e189 < k Initial program 79.3%
Simplified81.3%
Taylor expanded in j around inf 49.2%
if -2.5499999999999999e-14 < k < 1.2e189Initial program 84.0%
Taylor expanded in y around 0 79.6%
distribute-lft-out79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in j around 0 71.4%
Taylor expanded in b around 0 48.9%
Final simplification49.0%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= k -2.1e-25) (not (<= k 5.7e+104))) (* -27.0 (* j k)) (* b c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -2.1e-25) || !(k <= 5.7e+104)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
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) :: tmp
if ((k <= (-2.1d-25)) .or. (.not. (k <= 5.7d+104))) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
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 tmp;
if ((k <= -2.1e-25) || !(k <= 5.7e+104)) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -2.1e-25) or not (k <= 5.7e+104): tmp = -27.0 * (j * k) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -2.1e-25) || !(k <= 5.7e+104)) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((k <= -2.1e-25) || ~((k <= 5.7e+104))) tmp = -27.0 * (j * k); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -2.1e-25], N[Not[LessEqual[k, 5.7e+104]], $MachinePrecision]], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.1 \cdot 10^{-25} \lor \neg \left(k \leq 5.7 \cdot 10^{+104}\right):\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -2.10000000000000002e-25 or 5.69999999999999985e104 < k Initial program 79.6%
Simplified82.2%
Taylor expanded in j around inf 44.4%
if -2.10000000000000002e-25 < k < 5.69999999999999985e104Initial program 84.4%
Simplified90.3%
Taylor expanded in y around inf 74.5%
Taylor expanded in b around inf 29.6%
Final simplification36.7%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= k -1.2e-21) (* -27.0 (* j k)) (if (<= k 1.32e+104) (* b c) (* k (* j -27.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -1.2e-21) {
tmp = -27.0 * (j * k);
} else if (k <= 1.32e+104) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
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) :: tmp
if (k <= (-1.2d-21)) then
tmp = (-27.0d0) * (j * k)
else if (k <= 1.32d+104) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
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 tmp;
if (k <= -1.2e-21) {
tmp = -27.0 * (j * k);
} else if (k <= 1.32e+104) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -1.2e-21: tmp = -27.0 * (j * k) elif k <= 1.32e+104: tmp = b * c else: tmp = k * (j * -27.0) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -1.2e-21) tmp = Float64(-27.0 * Float64(j * k)); elseif (k <= 1.32e+104) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (k <= -1.2e-21) tmp = -27.0 * (j * k); elseif (k <= 1.32e+104) tmp = b * c; else tmp = k * (j * -27.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -1.2e-21], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.32e+104], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.2 \cdot 10^{-21}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;k \leq 1.32 \cdot 10^{+104}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < -1.2e-21Initial program 80.4%
Simplified83.6%
Taylor expanded in j around inf 44.5%
if -1.2e-21 < k < 1.32000000000000003e104Initial program 84.4%
Simplified90.3%
Taylor expanded in y around inf 74.5%
Taylor expanded in b around inf 29.6%
if 1.32000000000000003e104 < k Initial program 78.6%
Simplified80.5%
Taylor expanded in y around inf 73.8%
Taylor expanded in j around inf 44.4%
associate-*r*44.4%
*-commutative44.4%
*-commutative44.4%
Simplified44.4%
Final simplification36.7%
(FPCore (x y z t a b c i j k) :precision binary64 (* b c))
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;
}
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
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;
}
def code(x, y, z, t, a, b, c, i, j, k): return b * c
function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = b * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
\\
b \cdot c
\end{array}
Initial program 82.1%
Simplified85.6%
Taylor expanded in y around inf 74.7%
Taylor expanded in b around inf 21.1%
Final simplification21.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024095
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(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)))