
(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 21 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
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (+ (* (* 18.0 y) (* z t)) (* 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 t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * (((18.0 * y) * (z * t)) + (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 t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(Float64(18.0 * y) * Float64(z * t)) + Float64(i * -4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.8%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified25.0%
Taylor expanded in x around inf 66.7%
*-commutative66.7%
cancel-sign-sub-inv66.7%
metadata-eval66.7%
associate-*r*66.7%
*-commutative66.7%
*-commutative66.7%
Simplified66.7%
Final simplification94.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* -4.0 (* x i)) (* k (* j -27.0))))
(t_2 (* (* j 27.0) k))
(t_3 (- (* b c) (* t (* a 4.0)))))
(if (<= t_2 -2e+143)
t_1
(if (<= t_2 -2e-134)
t_3
(if (<= t_2 -1e-298)
(* t (* 18.0 (* y (* x z))))
(if (or (<= t_2 4e+20) (and (not (<= t_2 4e+44)) (<= t_2 1e+113)))
t_3
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 = (-4.0 * (x * i)) + (k * (j * -27.0));
double t_2 = (j * 27.0) * k;
double t_3 = (b * c) - (t * (a * 4.0));
double tmp;
if (t_2 <= -2e+143) {
tmp = t_1;
} else if (t_2 <= -2e-134) {
tmp = t_3;
} else if (t_2 <= -1e-298) {
tmp = t * (18.0 * (y * (x * z)));
} else if ((t_2 <= 4e+20) || (!(t_2 <= 4e+44) && (t_2 <= 1e+113))) {
tmp = t_3;
} 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) :: t_3
real(8) :: tmp
t_1 = ((-4.0d0) * (x * i)) + (k * (j * (-27.0d0)))
t_2 = (j * 27.0d0) * k
t_3 = (b * c) - (t * (a * 4.0d0))
if (t_2 <= (-2d+143)) then
tmp = t_1
else if (t_2 <= (-2d-134)) then
tmp = t_3
else if (t_2 <= (-1d-298)) then
tmp = t * (18.0d0 * (y * (x * z)))
else if ((t_2 <= 4d+20) .or. (.not. (t_2 <= 4d+44)) .and. (t_2 <= 1d+113)) then
tmp = t_3
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 = (-4.0 * (x * i)) + (k * (j * -27.0));
double t_2 = (j * 27.0) * k;
double t_3 = (b * c) - (t * (a * 4.0));
double tmp;
if (t_2 <= -2e+143) {
tmp = t_1;
} else if (t_2 <= -2e-134) {
tmp = t_3;
} else if (t_2 <= -1e-298) {
tmp = t * (18.0 * (y * (x * z)));
} else if ((t_2 <= 4e+20) || (!(t_2 <= 4e+44) && (t_2 <= 1e+113))) {
tmp = t_3;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (-4.0 * (x * i)) + (k * (j * -27.0)) t_2 = (j * 27.0) * k t_3 = (b * c) - (t * (a * 4.0)) tmp = 0 if t_2 <= -2e+143: tmp = t_1 elif t_2 <= -2e-134: tmp = t_3 elif t_2 <= -1e-298: tmp = t * (18.0 * (y * (x * z))) elif (t_2 <= 4e+20) or (not (t_2 <= 4e+44) and (t_2 <= 1e+113)): tmp = t_3 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(-4.0 * Float64(x * i)) + Float64(k * Float64(j * -27.0))) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))) tmp = 0.0 if (t_2 <= -2e+143) tmp = t_1; elseif (t_2 <= -2e-134) tmp = t_3; elseif (t_2 <= -1e-298) tmp = Float64(t * Float64(18.0 * Float64(y * Float64(x * z)))); elseif ((t_2 <= 4e+20) || (!(t_2 <= 4e+44) && (t_2 <= 1e+113))) tmp = t_3; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (-4.0 * (x * i)) + (k * (j * -27.0)); t_2 = (j * 27.0) * k; t_3 = (b * c) - (t * (a * 4.0)); tmp = 0.0; if (t_2 <= -2e+143) tmp = t_1; elseif (t_2 <= -2e-134) tmp = t_3; elseif (t_2 <= -1e-298) tmp = t * (18.0 * (y * (x * z))); elseif ((t_2 <= 4e+20) || (~((t_2 <= 4e+44)) && (t_2 <= 1e+113))) tmp = t_3; 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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+143], t$95$1, If[LessEqual[t$95$2, -2e-134], t$95$3, If[LessEqual[t$95$2, -1e-298], N[(t * N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$2, 4e+20], And[N[Not[LessEqual[t$95$2, 4e+44]], $MachinePrecision], LessEqual[t$95$2, 1e+113]]], t$95$3, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := b \cdot c - t \cdot \left(a \cdot 4\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-134}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-298}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+20} \lor \neg \left(t_2 \leq 4 \cdot 10^{+44}\right) \land t_2 \leq 10^{+113}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -2e143 or 4e20 < (*.f64 (*.f64 j 27) k) < 4.0000000000000004e44 or 1e113 < (*.f64 (*.f64 j 27) k) Initial program 82.5%
Taylor expanded in t around 0 76.3%
Taylor expanded in c around 0 70.5%
distribute-lft-in70.5%
associate-*r*70.5%
*-commutative70.5%
neg-mul-170.5%
associate-*r*70.5%
metadata-eval70.5%
sub-neg70.5%
associate-*r*70.6%
cancel-sign-sub-inv70.6%
*-commutative70.6%
distribute-rgt-neg-in70.6%
metadata-eval70.6%
Simplified70.6%
if -2e143 < (*.f64 (*.f64 j 27) k) < -2.00000000000000008e-134 or -9.99999999999999912e-299 < (*.f64 (*.f64 j 27) k) < 4e20 or 4.0000000000000004e44 < (*.f64 (*.f64 j 27) k) < 1e113Initial program 92.1%
Taylor expanded in y around 0 79.4%
distribute-lft-out79.4%
*-commutative79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in j around 0 74.9%
Taylor expanded in i around 0 60.9%
*-commutative60.9%
*-commutative60.9%
associate-*l*60.9%
Simplified60.9%
if -2.00000000000000008e-134 < (*.f64 (*.f64 j 27) k) < -9.99999999999999912e-299Initial program 89.4%
Simplified94.4%
Taylor expanded in t around inf 74.6%
Taylor expanded in y around inf 59.4%
Final simplification64.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))) (t_2 (- (* b c) (* 4.0 (* x i)))))
(if (<= (* j 27.0) -2e+166)
(- t_1 (* (* j 27.0) k))
(if (<= (* j 27.0) -5e+80)
t_2
(if (<= (* j 27.0) -1e-259)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= (* j 27.0) 5e-246)
t_2
(if (<= (* j 27.0) 2e-88)
(- (* b c) (* t (* a 4.0)))
(- t_1 (* 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) {
double t_1 = t * (a * -4.0);
double t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if ((j * 27.0) <= -2e+166) {
tmp = t_1 - ((j * 27.0) * k);
} else if ((j * 27.0) <= -5e+80) {
tmp = t_2;
} else if ((j * 27.0) <= -1e-259) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if ((j * 27.0) <= 5e-246) {
tmp = t_2;
} else if ((j * 27.0) <= 2e-88) {
tmp = (b * c) - (t * (a * 4.0));
} else {
tmp = t_1 - (j * (27.0 * k));
}
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 * (a * (-4.0d0))
t_2 = (b * c) - (4.0d0 * (x * i))
if ((j * 27.0d0) <= (-2d+166)) then
tmp = t_1 - ((j * 27.0d0) * k)
else if ((j * 27.0d0) <= (-5d+80)) then
tmp = t_2
else if ((j * 27.0d0) <= (-1d-259)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if ((j * 27.0d0) <= 5d-246) then
tmp = t_2
else if ((j * 27.0d0) <= 2d-88) then
tmp = (b * c) - (t * (a * 4.0d0))
else
tmp = t_1 - (j * (27.0d0 * k))
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 t_2 = (b * c) - (4.0 * (x * i));
double tmp;
if ((j * 27.0) <= -2e+166) {
tmp = t_1 - ((j * 27.0) * k);
} else if ((j * 27.0) <= -5e+80) {
tmp = t_2;
} else if ((j * 27.0) <= -1e-259) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if ((j * 27.0) <= 5e-246) {
tmp = t_2;
} else if ((j * 27.0) <= 2e-88) {
tmp = (b * c) - (t * (a * 4.0));
} else {
tmp = t_1 - (j * (27.0 * k));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) t_2 = (b * c) - (4.0 * (x * i)) tmp = 0 if (j * 27.0) <= -2e+166: tmp = t_1 - ((j * 27.0) * k) elif (j * 27.0) <= -5e+80: tmp = t_2 elif (j * 27.0) <= -1e-259: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif (j * 27.0) <= 5e-246: tmp = t_2 elif (j * 27.0) <= 2e-88: tmp = (b * c) - (t * (a * 4.0)) else: tmp = t_1 - (j * (27.0 * k)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) t_2 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) tmp = 0.0 if (Float64(j * 27.0) <= -2e+166) tmp = Float64(t_1 - Float64(Float64(j * 27.0) * k)); elseif (Float64(j * 27.0) <= -5e+80) tmp = t_2; elseif (Float64(j * 27.0) <= -1e-259) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (Float64(j * 27.0) <= 5e-246) tmp = t_2; elseif (Float64(j * 27.0) <= 2e-88) tmp = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))); else tmp = Float64(t_1 - Float64(j * Float64(27.0 * k))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (a * -4.0); t_2 = (b * c) - (4.0 * (x * i)); tmp = 0.0; if ((j * 27.0) <= -2e+166) tmp = t_1 - ((j * 27.0) * k); elseif ((j * 27.0) <= -5e+80) tmp = t_2; elseif ((j * 27.0) <= -1e-259) tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)); elseif ((j * 27.0) <= 5e-246) tmp = t_2; elseif ((j * 27.0) <= 2e-88) tmp = (b * c) - (t * (a * 4.0)); else tmp = t_1 - (j * (27.0 * k)); 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]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(j * 27.0), $MachinePrecision], -2e+166], N[(t$95$1 - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(j * 27.0), $MachinePrecision], -5e+80], t$95$2, If[LessEqual[N[(j * 27.0), $MachinePrecision], -1e-259], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(j * 27.0), $MachinePrecision], 5e-246], t$95$2, If[LessEqual[N[(j * 27.0), $MachinePrecision], 2e-88], N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;j \cdot 27 \leq -2 \cdot 10^{+166}:\\
\;\;\;\;t_1 - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{+80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \cdot 27 \leq -1 \cdot 10^{-259}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;j \cdot 27 \leq 5 \cdot 10^{-246}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \cdot 27 \leq 2 \cdot 10^{-88}:\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 - j \cdot \left(27 \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 j 27) < -1.99999999999999988e166Initial program 91.9%
Taylor expanded in x around 0 84.3%
Taylor expanded in a around inf 65.5%
associate-*r*65.5%
*-commutative65.5%
Simplified65.5%
if -1.99999999999999988e166 < (*.f64 j 27) < -4.99999999999999961e80 or -1.0000000000000001e-259 < (*.f64 j 27) < 4.9999999999999997e-246Initial program 84.1%
Taylor expanded in t around 0 57.4%
Taylor expanded in j around 0 55.0%
if -4.99999999999999961e80 < (*.f64 j 27) < -1.0000000000000001e-259Initial program 90.0%
Simplified90.3%
Taylor expanded in t around inf 59.6%
if 4.9999999999999997e-246 < (*.f64 j 27) < 1.99999999999999987e-88Initial program 93.7%
Taylor expanded in y around 0 75.4%
distribute-lft-out75.4%
*-commutative75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in j around 0 72.3%
Taylor expanded in i around 0 59.8%
*-commutative59.8%
*-commutative59.8%
associate-*l*59.8%
Simplified59.8%
if 1.99999999999999987e-88 < (*.f64 j 27) Initial program 86.1%
Taylor expanded in x around 0 91.2%
Taylor expanded in a around inf 49.4%
associate-*r*49.4%
*-commutative49.4%
Simplified49.4%
sub-neg49.4%
associate-*l*49.4%
Applied egg-rr49.4%
Final simplification56.6%
(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 (* y (* x z))) (* a -4.0))))
(* 27.0 (* j k)))))
(if (<= y -4.8e+187)
t_2
(if (<= y -1.02e+175)
(* x (+ (* (* 18.0 y) (* z t)) (* i -4.0)))
(if (<= y -1e+50)
t_2
(if (<= y 7.8e-187)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1)
(- (+ (* b c) (* x (- (* 18.0 (* y (* z t))) (* 4.0 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 = (j * 27.0) * k;
double t_2 = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
double tmp;
if (y <= -4.8e+187) {
tmp = t_2;
} else if (y <= -1.02e+175) {
tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
} else if (y <= -1e+50) {
tmp = t_2;
} else if (y <= 7.8e-187) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = ((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - 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 = (j * 27.0d0) * k
t_2 = ((b * c) + (t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0))))) - (27.0d0 * (j * k))
if (y <= (-4.8d+187)) then
tmp = t_2
else if (y <= (-1.02d+175)) then
tmp = x * (((18.0d0 * y) * (z * t)) + (i * (-4.0d0)))
else if (y <= (-1d+50)) then
tmp = t_2
else if (y <= 7.8d-187) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - t_1
else
tmp = ((b * c) + (x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i)))) - 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 = (j * 27.0) * k;
double t_2 = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
double tmp;
if (y <= -4.8e+187) {
tmp = t_2;
} else if (y <= -1.02e+175) {
tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
} else if (y <= -1e+50) {
tmp = t_2;
} else if (y <= 7.8e-187) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = ((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - t_1;
}
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 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k)) tmp = 0 if y <= -4.8e+187: tmp = t_2 elif y <= -1.02e+175: tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0)) elif y <= -1e+50: tmp = t_2 elif y <= 7.8e-187: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1 else: tmp = ((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - t_1 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(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0)))) - Float64(27.0 * Float64(j * k))) tmp = 0.0 if (y <= -4.8e+187) tmp = t_2; elseif (y <= -1.02e+175) tmp = Float64(x * Float64(Float64(Float64(18.0 * y) * Float64(z * t)) + Float64(i * -4.0))); elseif (y <= -1e+50) tmp = t_2; elseif (y <= 7.8e-187) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)))) - t_1); 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 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k)); tmp = 0.0; if (y <= -4.8e+187) tmp = t_2; elseif (y <= -1.02e+175) tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0)); elseif (y <= -1e+50) tmp = t_2; elseif (y <= 7.8e-187) tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1; else tmp = ((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - t_1; 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[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.8e+187], t$95$2, If[LessEqual[y, -1.02e+175], N[(x * N[(N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1e+50], t$95$2, If[LessEqual[y, 7.8e-187], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+187}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{+175}:\\
\;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right) + i \cdot -4\right)\\
\mathbf{elif}\;y \leq -1 \cdot 10^{+50}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-187}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\right) - t_1\\
\end{array}
\end{array}
if y < -4.79999999999999971e187 or -1.0199999999999999e175 < y < -1.0000000000000001e50Initial program 87.8%
associate--l-87.8%
associate-+l-87.8%
Simplified84.0%
Taylor expanded in i around 0 87.6%
if -4.79999999999999971e187 < y < -1.0199999999999999e175Initial program 79.7%
Simplified79.7%
Taylor expanded in x around inf 100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
if -1.0000000000000001e50 < y < 7.7999999999999998e-187Initial program 92.8%
Taylor expanded in y around 0 85.2%
distribute-lft-out85.2%
*-commutative85.2%
*-commutative85.2%
Simplified85.2%
if 7.7999999999999998e-187 < y Initial program 85.5%
Taylor expanded in x around 0 91.3%
Taylor expanded in a around 0 79.7%
Final simplification83.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -8e+220)
(- (+ (* b c) (* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))) (* 27.0 (* j k)))
(-
(+ (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) (* 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) {
double tmp;
if (y <= -8e+220) {
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
} else {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
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 (y <= (-8d+220)) then
tmp = ((b * c) + (t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0))))) - (27.0d0 * (j * k))
else
tmp = ((t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) + (b * c)) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
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 (y <= -8e+220) {
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
} else {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -8e+220: tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k)) else: tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -8e+220) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0)))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (y <= -8e+220) tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k)); else tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -8e+220], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+220}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if y < -8e220Initial program 78.8%
associate--l-78.8%
associate-+l-78.8%
Simplified72.2%
Taylor expanded in i around 0 86.9%
if -8e220 < y Initial program 89.2%
Simplified89.3%
Final simplification89.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= i 8e+140)
(-
(+ (* t (- (* (* x 18.0) (* y z)) (* a 4.0))) (* b c))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(-
(- (+ (* b c) (* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))) (* 4.0 (* t a)))
(* (* 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) {
double tmp;
if (i <= 8e+140) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
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 (i <= 8d+140) then
tmp = ((t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0))) + (b * c)) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = (((b * c) + (x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i)))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
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 (i <= 8e+140) {
tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if i <= 8e+140: tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (i <= 8e+140) tmp = Float64(Float64(Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (i <= 8e+140) tmp = ((t * (((x * 18.0) * (y * z)) - (a * 4.0))) + (b * c)) - ((x * (4.0 * i)) + (j * (27.0 * k))); else tmp = (((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - (4.0 * (t * a))) - ((j * 27.0) * k); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[i, 8e+140], N[(N[(N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq 8 \cdot 10^{+140}:\\
\;\;\;\;\left(t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right) + b \cdot c\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if i < 8.00000000000000047e140Initial program 90.9%
Simplified90.6%
if 8.00000000000000047e140 < i Initial program 74.9%
Taylor expanded in x around 0 94.3%
Final simplification91.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)) (t_2 (- (- (* b c) (* 4.0 (* t a))) t_1)))
(if (<= (* a 4.0) -4e+60)
t_2
(if (<= (* a 4.0) -1e-86)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= (* a 4.0) 2e-9) (- (- (* 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) - (4.0 * (t * a))) - t_1;
double tmp;
if ((a * 4.0) <= -4e+60) {
tmp = t_2;
} else if ((a * 4.0) <= -1e-86) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if ((a * 4.0) <= 2e-9) {
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) - (4.0d0 * (t * a))) - t_1
if ((a * 4.0d0) <= (-4d+60)) then
tmp = t_2
else if ((a * 4.0d0) <= (-1d-86)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if ((a * 4.0d0) <= 2d-9) 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) - (4.0 * (t * a))) - t_1;
double tmp;
if ((a * 4.0) <= -4e+60) {
tmp = t_2;
} else if ((a * 4.0) <= -1e-86) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if ((a * 4.0) <= 2e-9) {
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) - (4.0 * (t * a))) - t_1 tmp = 0 if (a * 4.0) <= -4e+60: tmp = t_2 elif (a * 4.0) <= -1e-86: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif (a * 4.0) <= 2e-9: 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(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1) tmp = 0.0 if (Float64(a * 4.0) <= -4e+60) tmp = t_2; elseif (Float64(a * 4.0) <= -1e-86) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (Float64(a * 4.0) <= 2e-9) 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) - (4.0 * (t * a))) - t_1; tmp = 0.0; if ((a * 4.0) <= -4e+60) tmp = t_2; elseif ((a * 4.0) <= -1e-86) tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)); elseif ((a * 4.0) <= 2e-9) 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[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[N[(a * 4.0), $MachinePrecision], -4e+60], t$95$2, If[LessEqual[N[(a * 4.0), $MachinePrecision], -1e-86], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 4.0), $MachinePrecision], 2e-9], 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 := \left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{if}\;a \cdot 4 \leq -4 \cdot 10^{+60}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot 4 \leq -1 \cdot 10^{-86}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;a \cdot 4 \leq 2 \cdot 10^{-9}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 a 4) < -3.9999999999999998e60 or 2.00000000000000012e-9 < (*.f64 a 4) Initial program 87.2%
Taylor expanded in x around 0 78.6%
if -3.9999999999999998e60 < (*.f64 a 4) < -1.00000000000000008e-86Initial program 84.3%
Simplified84.5%
Taylor expanded in t around inf 64.0%
if -1.00000000000000008e-86 < (*.f64 a 4) < 2.00000000000000012e-9Initial program 91.5%
Taylor expanded in t around 0 74.1%
Final simplification74.9%
(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))))
(if (<= (* a 4.0) -4e+60)
t_1
(if (<= (* a 4.0) -1e-86)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(if (<= (* a 4.0) 2e-9)
(- (+ (* b c) (* -4.0 (* x i))) (* j (* 27.0 k)))
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))) - ((j * 27.0) * k);
double tmp;
if ((a * 4.0) <= -4e+60) {
tmp = t_1;
} else if ((a * 4.0) <= -1e-86) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if ((a * 4.0) <= 2e-9) {
tmp = ((b * c) + (-4.0 * (x * i))) - (j * (27.0 * k));
} 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 = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
if ((a * 4.0d0) <= (-4d+60)) then
tmp = t_1
else if ((a * 4.0d0) <= (-1d-86)) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else if ((a * 4.0d0) <= 2d-9) then
tmp = ((b * c) + ((-4.0d0) * (x * i))) - (j * (27.0d0 * k))
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))) - ((j * 27.0) * k);
double tmp;
if ((a * 4.0) <= -4e+60) {
tmp = t_1;
} else if ((a * 4.0) <= -1e-86) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else if ((a * 4.0) <= 2e-9) {
tmp = ((b * c) + (-4.0 * (x * i))) - (j * (27.0 * k));
} 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))) - ((j * 27.0) * k) tmp = 0 if (a * 4.0) <= -4e+60: tmp = t_1 elif (a * 4.0) <= -1e-86: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) elif (a * 4.0) <= 2e-9: tmp = ((b * c) + (-4.0 * (x * i))) - (j * (27.0 * k)) else: tmp = t_1 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)) tmp = 0.0 if (Float64(a * 4.0) <= -4e+60) tmp = t_1; elseif (Float64(a * 4.0) <= -1e-86) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); elseif (Float64(a * 4.0) <= 2e-9) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(x * i))) - Float64(j * Float64(27.0 * k))); 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))) - ((j * 27.0) * k); tmp = 0.0; if ((a * 4.0) <= -4e+60) tmp = t_1; elseif ((a * 4.0) <= -1e-86) tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)); elseif ((a * 4.0) <= 2e-9) tmp = ((b * c) + (-4.0 * (x * i))) - (j * (27.0 * k)); 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[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a * 4.0), $MachinePrecision], -4e+60], t$95$1, If[LessEqual[N[(a * 4.0), $MachinePrecision], -1e-86], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 4.0), $MachinePrecision], 2e-9], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\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\\
\mathbf{if}\;a \cdot 4 \leq -4 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot 4 \leq -1 \cdot 10^{-86}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;a \cdot 4 \leq 2 \cdot 10^{-9}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(x \cdot i\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 a 4) < -3.9999999999999998e60 or 2.00000000000000012e-9 < (*.f64 a 4) Initial program 87.2%
Taylor expanded in x around 0 78.6%
if -3.9999999999999998e60 < (*.f64 a 4) < -1.00000000000000008e-86Initial program 84.3%
Simplified84.5%
Taylor expanded in t around inf 64.0%
if -1.00000000000000008e-86 < (*.f64 a 4) < 2.00000000000000012e-9Initial program 91.5%
Taylor expanded in t around 0 74.1%
sub-neg74.1%
cancel-sign-sub-inv74.1%
metadata-eval74.1%
associate-*l*74.1%
Applied egg-rr74.1%
Final simplification74.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= z -8e-108)
(- (* t (- (* 18.0 (* y (* x z))) (* a 4.0))) t_1)
(if (<= z 5.9e+156)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1)
(- (+ (* b c) (* x (- (* 18.0 (* y (* z t))) (* 4.0 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 = (j * 27.0) * k;
double tmp;
if (z <= -8e-108) {
tmp = (t * ((18.0 * (y * (x * z))) - (a * 4.0))) - t_1;
} else if (z <= 5.9e+156) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = ((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - 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 = (j * 27.0d0) * k
if (z <= (-8d-108)) then
tmp = (t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))) - t_1
else if (z <= 5.9d+156) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - t_1
else
tmp = ((b * c) + (x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i)))) - 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 = (j * 27.0) * k;
double tmp;
if (z <= -8e-108) {
tmp = (t * ((18.0 * (y * (x * z))) - (a * 4.0))) - t_1;
} else if (z <= 5.9e+156) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = ((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if z <= -8e-108: tmp = (t * ((18.0 * (y * (x * z))) - (a * 4.0))) - t_1 elif z <= 5.9e+156: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1 else: tmp = ((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - t_1 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 (z <= -8e-108) tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) - t_1); elseif (z <= 5.9e+156) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - t_1); else tmp = Float64(Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)))) - t_1); 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 (z <= -8e-108) tmp = (t * ((18.0 * (y * (x * z))) - (a * 4.0))) - t_1; elseif (z <= 5.9e+156) tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1; else tmp = ((b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)))) - t_1; 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[LessEqual[z, -8e-108], N[(N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 5.9e+156], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;z \leq -8 \cdot 10^{-108}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right) - t_1\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{+156}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\right) - t_1\\
\end{array}
\end{array}
if z < -8.00000000000000032e-108Initial program 87.6%
Taylor expanded in x around 0 83.1%
Taylor expanded in t around inf 73.9%
if -8.00000000000000032e-108 < z < 5.8999999999999997e156Initial program 90.6%
Taylor expanded in y around 0 89.1%
distribute-lft-out89.1%
*-commutative89.1%
*-commutative89.1%
Simplified89.1%
if 5.8999999999999997e156 < z Initial program 85.3%
Taylor expanded in x around 0 79.9%
Taylor expanded in a around 0 82.9%
Final simplification82.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.38e+240)
(* x (+ (* (* 18.0 y) (* z t)) (* i -4.0)))
(if (<= x -1.35e+165)
(- (* b c) (* 4.0 (+ (* t a) (* x i))))
(if (or (<= x -49000.0) (not (<= x 6.2e-41)))
(+ (* b c) (* x (- (* 18.0 (* y (* z t))) (* 4.0 i))))
(- (- (* b c) (* 4.0 (* t a))) (* 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) {
double tmp;
if (x <= -1.38e+240) {
tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
} else if (x <= -1.35e+165) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else if ((x <= -49000.0) || !(x <= 6.2e-41)) {
tmp = (b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - (j * (27.0 * k));
}
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 (x <= (-1.38d+240)) then
tmp = x * (((18.0d0 * y) * (z * t)) + (i * (-4.0d0)))
else if (x <= (-1.35d+165)) then
tmp = (b * c) - (4.0d0 * ((t * a) + (x * i)))
else if ((x <= (-49000.0d0)) .or. (.not. (x <= 6.2d-41))) then
tmp = (b * c) + (x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i)))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - (j * (27.0d0 * k))
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 (x <= -1.38e+240) {
tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
} else if (x <= -1.35e+165) {
tmp = (b * c) - (4.0 * ((t * a) + (x * i)));
} else if ((x <= -49000.0) || !(x <= 6.2e-41)) {
tmp = (b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i)));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - (j * (27.0 * k));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.38e+240: tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0)) elif x <= -1.35e+165: tmp = (b * c) - (4.0 * ((t * a) + (x * i))) elif (x <= -49000.0) or not (x <= 6.2e-41): tmp = (b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i))) else: tmp = ((b * c) - (4.0 * (t * a))) - (j * (27.0 * k)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.38e+240) tmp = Float64(x * Float64(Float64(Float64(18.0 * y) * Float64(z * t)) + Float64(i * -4.0))); elseif (x <= -1.35e+165) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))); elseif ((x <= -49000.0) || !(x <= 6.2e-41)) tmp = Float64(Float64(b * c) + Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(j * Float64(27.0 * k))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -1.38e+240) tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0)); elseif (x <= -1.35e+165) tmp = (b * c) - (4.0 * ((t * a) + (x * i))); elseif ((x <= -49000.0) || ~((x <= 6.2e-41))) tmp = (b * c) + (x * ((18.0 * (y * (z * t))) - (4.0 * i))); else tmp = ((b * c) - (4.0 * (t * a))) - (j * (27.0 * k)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.38e+240], N[(x * N[(N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.35e+165], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -49000.0], N[Not[LessEqual[x, 6.2e-41]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.38 \cdot 10^{+240}:\\
\;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right) + i \cdot -4\right)\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{+165}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;x \leq -49000 \lor \neg \left(x \leq 6.2 \cdot 10^{-41}\right):\\
\;\;\;\;b \cdot c + x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - j \cdot \left(27 \cdot k\right)\\
\end{array}
\end{array}
if x < -1.3799999999999999e240Initial program 53.7%
Simplified69.0%
Taylor expanded in x around inf 86.2%
*-commutative86.2%
cancel-sign-sub-inv86.2%
metadata-eval86.2%
associate-*r*86.2%
*-commutative86.2%
*-commutative86.2%
Simplified86.2%
if -1.3799999999999999e240 < x < -1.35e165Initial program 68.8%
Taylor expanded in y around 0 87.6%
distribute-lft-out87.6%
*-commutative87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in j around 0 84.5%
if -1.35e165 < x < -49000 or 6.20000000000000001e-41 < x Initial program 84.1%
Taylor expanded in x around 0 87.2%
Taylor expanded in a around 0 81.2%
Taylor expanded in j around 0 75.5%
if -49000 < x < 6.20000000000000001e-41Initial program 98.3%
Taylor expanded in x around 0 84.7%
sub-neg84.7%
*-commutative84.7%
associate-*l*84.7%
Applied egg-rr84.7%
Final simplification81.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) (* 4.0 (+ (* t a) (* x i))))))
(if (<= k -9e-78)
(- (* t (* a -4.0)) t_1)
(if (<= k 7e+25)
t_2
(if (<= k 2.3e+92)
(+ (* -4.0 (* x i)) (* k (* j -27.0)))
(if (<= k 4.6e+150)
t_2
(if (<= k 3.1e+233)
(* t (- (* 18.0 (* y (* x z))) (* a 4.0)))
(- (* 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 = (j * 27.0) * k;
double t_2 = (b * c) - (4.0 * ((t * a) + (x * i)));
double tmp;
if (k <= -9e-78) {
tmp = (t * (a * -4.0)) - t_1;
} else if (k <= 7e+25) {
tmp = t_2;
} else if (k <= 2.3e+92) {
tmp = (-4.0 * (x * i)) + (k * (j * -27.0));
} else if (k <= 4.6e+150) {
tmp = t_2;
} else if (k <= 3.1e+233) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = (b * c) - 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 = (j * 27.0d0) * k
t_2 = (b * c) - (4.0d0 * ((t * a) + (x * i)))
if (k <= (-9d-78)) then
tmp = (t * (a * (-4.0d0))) - t_1
else if (k <= 7d+25) then
tmp = t_2
else if (k <= 2.3d+92) then
tmp = ((-4.0d0) * (x * i)) + (k * (j * (-27.0d0)))
else if (k <= 4.6d+150) then
tmp = t_2
else if (k <= 3.1d+233) then
tmp = t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))
else
tmp = (b * c) - 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 = (j * 27.0) * k;
double t_2 = (b * c) - (4.0 * ((t * a) + (x * i)));
double tmp;
if (k <= -9e-78) {
tmp = (t * (a * -4.0)) - t_1;
} else if (k <= 7e+25) {
tmp = t_2;
} else if (k <= 2.3e+92) {
tmp = (-4.0 * (x * i)) + (k * (j * -27.0));
} else if (k <= 4.6e+150) {
tmp = t_2;
} else if (k <= 3.1e+233) {
tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0));
} else {
tmp = (b * c) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = (b * c) - (4.0 * ((t * a) + (x * i))) tmp = 0 if k <= -9e-78: tmp = (t * (a * -4.0)) - t_1 elif k <= 7e+25: tmp = t_2 elif k <= 2.3e+92: tmp = (-4.0 * (x * i)) + (k * (j * -27.0)) elif k <= 4.6e+150: tmp = t_2 elif k <= 3.1e+233: tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)) else: tmp = (b * c) - t_1 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(4.0 * Float64(Float64(t * a) + Float64(x * i)))) tmp = 0.0 if (k <= -9e-78) tmp = Float64(Float64(t * Float64(a * -4.0)) - t_1); elseif (k <= 7e+25) tmp = t_2; elseif (k <= 2.3e+92) tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(k * Float64(j * -27.0))); elseif (k <= 4.6e+150) tmp = t_2; elseif (k <= 3.1e+233) tmp = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))); else tmp = Float64(Float64(b * c) - t_1); 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) - (4.0 * ((t * a) + (x * i))); tmp = 0.0; if (k <= -9e-78) tmp = (t * (a * -4.0)) - t_1; elseif (k <= 7e+25) tmp = t_2; elseif (k <= 2.3e+92) tmp = (-4.0 * (x * i)) + (k * (j * -27.0)); elseif (k <= 4.6e+150) tmp = t_2; elseif (k <= 3.1e+233) tmp = t * ((18.0 * (y * (x * z))) - (a * 4.0)); else tmp = (b * c) - t_1; 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[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k, -9e-78], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[k, 7e+25], t$95$2, If[LessEqual[k, 2.3e+92], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 4.6e+150], t$95$2, If[LessEqual[k, 3.1e+233], N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;k \leq -9 \cdot 10^{-78}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - t_1\\
\mathbf{elif}\;k \leq 7 \cdot 10^{+25}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;k \leq 2.3 \cdot 10^{+92}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;k \leq 4.6 \cdot 10^{+150}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;k \leq 3.1 \cdot 10^{+233}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t_1\\
\end{array}
\end{array}
if k < -9e-78Initial program 89.2%
Taylor expanded in x around 0 85.9%
Taylor expanded in a around inf 52.7%
associate-*r*52.7%
*-commutative52.7%
Simplified52.7%
if -9e-78 < k < 6.99999999999999999e25 or 2.29999999999999998e92 < k < 4.60000000000000002e150Initial program 90.1%
Taylor expanded in y around 0 77.3%
distribute-lft-out77.3%
*-commutative77.3%
*-commutative77.3%
Simplified77.3%
Taylor expanded in j around 0 69.6%
if 6.99999999999999999e25 < k < 2.29999999999999998e92Initial program 88.5%
Taylor expanded in t around 0 78.7%
Taylor expanded in c around 0 70.9%
distribute-lft-in70.9%
associate-*r*71.1%
*-commutative71.1%
neg-mul-171.1%
associate-*r*71.1%
metadata-eval71.1%
sub-neg71.1%
associate-*r*71.1%
cancel-sign-sub-inv71.1%
*-commutative71.1%
distribute-rgt-neg-in71.1%
metadata-eval71.1%
Simplified71.1%
if 4.60000000000000002e150 < k < 3.10000000000000016e233Initial program 64.1%
Simplified73.2%
Taylor expanded in t around inf 82.3%
if 3.10000000000000016e233 < k Initial program 91.7%
Taylor expanded in x around 0 91.7%
Taylor expanded in c around inf 83.6%
Final simplification65.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t 9.6e+148)
(- (- (* b c) (* 4.0 (+ (* t a) (* x i)))) t_1)
(- (* t (- (* 18.0 (* y (* x z))) (* a 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 = (j * 27.0) * k;
double tmp;
if (t <= 9.6e+148) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = (t * ((18.0 * (y * (x * z))) - (a * 4.0))) - 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 = (j * 27.0d0) * k
if (t <= 9.6d+148) then
tmp = ((b * c) - (4.0d0 * ((t * a) + (x * i)))) - t_1
else
tmp = (t * ((18.0d0 * (y * (x * z))) - (a * 4.0d0))) - 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 = (j * 27.0) * k;
double tmp;
if (t <= 9.6e+148) {
tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1;
} else {
tmp = (t * ((18.0 * (y * (x * z))) - (a * 4.0))) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t <= 9.6e+148: tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1 else: tmp = (t * ((18.0 * (y * (x * z))) - (a * 4.0))) - t_1 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 <= 9.6e+148) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(Float64(t * a) + Float64(x * i)))) - t_1); else tmp = Float64(Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) - Float64(a * 4.0))) - t_1); 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 <= 9.6e+148) tmp = ((b * c) - (4.0 * ((t * a) + (x * i)))) - t_1; else tmp = (t * ((18.0 * (y * (x * z))) - (a * 4.0))) - t_1; 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[LessEqual[t, 9.6e+148], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t \leq 9.6 \cdot 10^{+148}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a + x \cdot i\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) - a \cdot 4\right) - t_1\\
\end{array}
\end{array}
if t < 9.59999999999999979e148Initial program 89.0%
Taylor expanded in y around 0 81.5%
distribute-lft-out81.5%
*-commutative81.5%
*-commutative81.5%
Simplified81.5%
if 9.59999999999999979e148 < t Initial program 86.8%
Taylor expanded in x around 0 79.3%
Taylor expanded in t around inf 89.1%
Final simplification82.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -1.12e+14)
(- (* b c) (* 4.0 (* x i)))
(if (<= c -5.3e-248)
(* -4.0 (+ (* t a) (* x i)))
(if (<= c 1e-51)
(- (* t (* a -4.0)) (* (* j 27.0) k))
(if (<= c 2.1e+133)
(+ (* -4.0 (* x i)) (* k (* j -27.0)))
(- (* b c) (* t (* a 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 (c <= -1.12e+14) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= -5.3e-248) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (c <= 1e-51) {
tmp = (t * (a * -4.0)) - ((j * 27.0) * k);
} else if (c <= 2.1e+133) {
tmp = (-4.0 * (x * i)) + (k * (j * -27.0));
} else {
tmp = (b * c) - (t * (a * 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) :: tmp
if (c <= (-1.12d+14)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (c <= (-5.3d-248)) then
tmp = (-4.0d0) * ((t * a) + (x * i))
else if (c <= 1d-51) then
tmp = (t * (a * (-4.0d0))) - ((j * 27.0d0) * k)
else if (c <= 2.1d+133) then
tmp = ((-4.0d0) * (x * i)) + (k * (j * (-27.0d0)))
else
tmp = (b * c) - (t * (a * 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 tmp;
if (c <= -1.12e+14) {
tmp = (b * c) - (4.0 * (x * i));
} else if (c <= -5.3e-248) {
tmp = -4.0 * ((t * a) + (x * i));
} else if (c <= 1e-51) {
tmp = (t * (a * -4.0)) - ((j * 27.0) * k);
} else if (c <= 2.1e+133) {
tmp = (-4.0 * (x * i)) + (k * (j * -27.0));
} else {
tmp = (b * c) - (t * (a * 4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -1.12e+14: tmp = (b * c) - (4.0 * (x * i)) elif c <= -5.3e-248: tmp = -4.0 * ((t * a) + (x * i)) elif c <= 1e-51: tmp = (t * (a * -4.0)) - ((j * 27.0) * k) elif c <= 2.1e+133: tmp = (-4.0 * (x * i)) + (k * (j * -27.0)) else: tmp = (b * c) - (t * (a * 4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -1.12e+14) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (c <= -5.3e-248) tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); elseif (c <= 1e-51) tmp = Float64(Float64(t * Float64(a * -4.0)) - Float64(Float64(j * 27.0) * k)); elseif (c <= 2.1e+133) tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(k * Float64(j * -27.0))); else tmp = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (c <= -1.12e+14) tmp = (b * c) - (4.0 * (x * i)); elseif (c <= -5.3e-248) tmp = -4.0 * ((t * a) + (x * i)); elseif (c <= 1e-51) tmp = (t * (a * -4.0)) - ((j * 27.0) * k); elseif (c <= 2.1e+133) tmp = (-4.0 * (x * i)) + (k * (j * -27.0)); else tmp = (b * c) - (t * (a * 4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -1.12e+14], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -5.3e-248], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 1e-51], N[(N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.1e+133], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.12 \cdot 10^{+14}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;c \leq -5.3 \cdot 10^{-248}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{elif}\;c \leq 10^{-51}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;c \leq 2.1 \cdot 10^{+133}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\
\end{array}
\end{array}
if c < -1.12e14Initial program 84.2%
Taylor expanded in t around 0 57.6%
Taylor expanded in j around 0 48.7%
if -1.12e14 < c < -5.3e-248Initial program 98.2%
Taylor expanded in y around 0 80.9%
distribute-lft-out80.9%
*-commutative80.9%
*-commutative80.9%
Simplified80.9%
Taylor expanded in j around 0 64.1%
Taylor expanded in c around 0 57.4%
if -5.3e-248 < c < 1e-51Initial program 87.3%
Taylor expanded in x around 0 81.5%
Taylor expanded in a around inf 64.1%
associate-*r*64.1%
*-commutative64.1%
Simplified64.1%
if 1e-51 < c < 2.1e133Initial program 88.8%
Taylor expanded in t around 0 71.7%
Taylor expanded in c around 0 48.1%
distribute-lft-in48.1%
associate-*r*48.2%
*-commutative48.2%
neg-mul-148.2%
associate-*r*48.2%
metadata-eval48.2%
sub-neg48.2%
associate-*r*48.1%
cancel-sign-sub-inv48.1%
*-commutative48.1%
distribute-rgt-neg-in48.1%
metadata-eval48.1%
Simplified48.1%
if 2.1e133 < c Initial program 83.5%
Taylor expanded in y around 0 75.8%
distribute-lft-out75.8%
*-commutative75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in j around 0 68.9%
Taylor expanded in i around 0 60.0%
*-commutative60.0%
*-commutative60.0%
associate-*l*60.0%
Simplified60.0%
Final simplification56.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= i -1e+213)
(+ (* -4.0 (* x i)) (* k (* j -27.0)))
(if (<= i 3.2e+146)
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(* x (+ (* (* 18.0 y) (* z 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 (i <= -1e+213) {
tmp = (-4.0 * (x * i)) + (k * (j * -27.0));
} else if (i <= 3.2e+146) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = x * (((18.0 * y) * (z * t)) + (i * -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) :: tmp
if (i <= (-1d+213)) then
tmp = ((-4.0d0) * (x * i)) + (k * (j * (-27.0d0)))
else if (i <= 3.2d+146) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else
tmp = x * (((18.0d0 * y) * (z * t)) + (i * (-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 tmp;
if (i <= -1e+213) {
tmp = (-4.0 * (x * i)) + (k * (j * -27.0));
} else if (i <= 3.2e+146) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if i <= -1e+213: tmp = (-4.0 * (x * i)) + (k * (j * -27.0)) elif i <= 3.2e+146: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (i <= -1e+213) tmp = Float64(Float64(-4.0 * Float64(x * i)) + Float64(k * Float64(j * -27.0))); elseif (i <= 3.2e+146) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(x * Float64(Float64(Float64(18.0 * y) * Float64(z * 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 (i <= -1e+213) tmp = (-4.0 * (x * i)) + (k * (j * -27.0)); elseif (i <= 3.2e+146) tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k); else tmp = x * (((18.0 * y) * (z * t)) + (i * -4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[i, -1e+213], N[(N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.2e+146], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(18.0 * y), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1 \cdot 10^{+213}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right) + k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;i \leq 3.2 \cdot 10^{+146}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\left(18 \cdot y\right) \cdot \left(z \cdot t\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if i < -9.99999999999999984e212Initial program 96.0%
Taylor expanded in t around 0 87.3%
Taylor expanded in c around 0 76.2%
distribute-lft-in76.2%
associate-*r*76.2%
*-commutative76.2%
neg-mul-176.2%
associate-*r*76.2%
metadata-eval76.2%
sub-neg76.2%
associate-*r*76.2%
cancel-sign-sub-inv76.2%
*-commutative76.2%
distribute-rgt-neg-in76.2%
metadata-eval76.2%
Simplified76.2%
if -9.99999999999999984e212 < i < 3.2e146Initial program 90.3%
Taylor expanded in x around 0 71.2%
if 3.2e146 < i Initial program 74.2%
Simplified74.2%
Taylor expanded in x around inf 80.7%
*-commutative80.7%
cancel-sign-sub-inv80.7%
metadata-eval80.7%
associate-*r*80.7%
*-commutative80.7%
*-commutative80.7%
Simplified80.7%
Final simplification73.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))))
(if (<= t -1.6e-67)
t_1
(if (<= t 2.3e-152)
(- (* b c) (* (* j 27.0) k))
(if (<= t 1.3e+64)
(- (* b c) (* t (* a 4.0)))
(if (<= t 3.7e+220) t_1 (* (* 18.0 y) (* t (* x z)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * ((t * a) + (x * i));
double tmp;
if (t <= -1.6e-67) {
tmp = t_1;
} else if (t <= 2.3e-152) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (t <= 1.3e+64) {
tmp = (b * c) - (t * (a * 4.0));
} else if (t <= 3.7e+220) {
tmp = t_1;
} else {
tmp = (18.0 * y) * (t * (x * z));
}
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) * ((t * a) + (x * i))
if (t <= (-1.6d-67)) then
tmp = t_1
else if (t <= 2.3d-152) then
tmp = (b * c) - ((j * 27.0d0) * k)
else if (t <= 1.3d+64) then
tmp = (b * c) - (t * (a * 4.0d0))
else if (t <= 3.7d+220) then
tmp = t_1
else
tmp = (18.0d0 * y) * (t * (x * z))
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 * ((t * a) + (x * i));
double tmp;
if (t <= -1.6e-67) {
tmp = t_1;
} else if (t <= 2.3e-152) {
tmp = (b * c) - ((j * 27.0) * k);
} else if (t <= 1.3e+64) {
tmp = (b * c) - (t * (a * 4.0));
} else if (t <= 3.7e+220) {
tmp = t_1;
} else {
tmp = (18.0 * y) * (t * (x * z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) tmp = 0 if t <= -1.6e-67: tmp = t_1 elif t <= 2.3e-152: tmp = (b * c) - ((j * 27.0) * k) elif t <= 1.3e+64: tmp = (b * c) - (t * (a * 4.0)) elif t <= 3.7e+220: tmp = t_1 else: tmp = (18.0 * y) * (t * (x * z)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (t <= -1.6e-67) tmp = t_1; elseif (t <= 2.3e-152) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (t <= 1.3e+64) tmp = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))); elseif (t <= 3.7e+220) tmp = t_1; else tmp = Float64(Float64(18.0 * y) * Float64(t * Float64(x * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -4.0 * ((t * a) + (x * i)); tmp = 0.0; if (t <= -1.6e-67) tmp = t_1; elseif (t <= 2.3e-152) tmp = (b * c) - ((j * 27.0) * k); elseif (t <= 1.3e+64) tmp = (b * c) - (t * (a * 4.0)); elseif (t <= 3.7e+220) tmp = t_1; else tmp = (18.0 * y) * (t * (x * z)); 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[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e-67], t$95$1, If[LessEqual[t, 2.3e-152], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+64], N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e+220], t$95$1, N[(N[(18.0 * y), $MachinePrecision] * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{-67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-152}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+64}:\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+220}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(18 \cdot y\right) \cdot \left(t \cdot \left(x \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -1.60000000000000011e-67 or 1.29999999999999998e64 < t < 3.7e220Initial program 88.1%
Taylor expanded in y around 0 77.7%
distribute-lft-out77.7%
*-commutative77.7%
*-commutative77.7%
Simplified77.7%
Taylor expanded in j around 0 65.1%
Taylor expanded in c around 0 54.8%
if -1.60000000000000011e-67 < t < 2.3000000000000001e-152Initial program 87.4%
Taylor expanded in x around 0 94.8%
Taylor expanded in c around inf 71.1%
if 2.3000000000000001e-152 < t < 1.29999999999999998e64Initial program 95.3%
Taylor expanded in y around 0 80.7%
distribute-lft-out80.7%
*-commutative80.7%
*-commutative80.7%
Simplified80.7%
Taylor expanded in j around 0 69.5%
Taylor expanded in i around 0 54.0%
*-commutative54.0%
*-commutative54.0%
associate-*l*54.0%
Simplified54.0%
if 3.7e220 < t Initial program 83.9%
Simplified88.0%
Taylor expanded in y around inf 65.0%
associate-*r*65.0%
*-commutative65.0%
Simplified65.0%
Final simplification60.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))) (t_2 (* k (* j -27.0))))
(if (<= c -3200000000000.0)
(* b c)
(if (<= c -7.5e-253)
t_1
(if (<= c 4e-126)
t_2
(if (<= c 1.45e-50) t_1 (if (<= c 2.1e+133) t_2 (* 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 t_1 = t * (a * -4.0);
double t_2 = k * (j * -27.0);
double tmp;
if (c <= -3200000000000.0) {
tmp = b * c;
} else if (c <= -7.5e-253) {
tmp = t_1;
} else if (c <= 4e-126) {
tmp = t_2;
} else if (c <= 1.45e-50) {
tmp = t_1;
} else if (c <= 2.1e+133) {
tmp = t_2;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
t_2 = k * (j * (-27.0d0))
if (c <= (-3200000000000.0d0)) then
tmp = b * c
else if (c <= (-7.5d-253)) then
tmp = t_1
else if (c <= 4d-126) then
tmp = t_2
else if (c <= 1.45d-50) then
tmp = t_1
else if (c <= 2.1d+133) then
tmp = t_2
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 t_1 = t * (a * -4.0);
double t_2 = k * (j * -27.0);
double tmp;
if (c <= -3200000000000.0) {
tmp = b * c;
} else if (c <= -7.5e-253) {
tmp = t_1;
} else if (c <= 4e-126) {
tmp = t_2;
} else if (c <= 1.45e-50) {
tmp = t_1;
} else if (c <= 2.1e+133) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) t_2 = k * (j * -27.0) tmp = 0 if c <= -3200000000000.0: tmp = b * c elif c <= -7.5e-253: tmp = t_1 elif c <= 4e-126: tmp = t_2 elif c <= 1.45e-50: tmp = t_1 elif c <= 2.1e+133: tmp = t_2 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) t_2 = Float64(k * Float64(j * -27.0)) tmp = 0.0 if (c <= -3200000000000.0) tmp = Float64(b * c); elseif (c <= -7.5e-253) tmp = t_1; elseif (c <= 4e-126) tmp = t_2; elseif (c <= 1.45e-50) tmp = t_1; elseif (c <= 2.1e+133) tmp = t_2; else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (a * -4.0); t_2 = k * (j * -27.0); tmp = 0.0; if (c <= -3200000000000.0) tmp = b * c; elseif (c <= -7.5e-253) tmp = t_1; elseif (c <= 4e-126) tmp = t_2; elseif (c <= 1.45e-50) tmp = t_1; elseif (c <= 2.1e+133) tmp = t_2; else tmp = b * c; 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]}, Block[{t$95$2 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3200000000000.0], N[(b * c), $MachinePrecision], If[LessEqual[c, -7.5e-253], t$95$1, If[LessEqual[c, 4e-126], t$95$2, If[LessEqual[c, 1.45e-50], t$95$1, If[LessEqual[c, 2.1e+133], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := k \cdot \left(j \cdot -27\right)\\
\mathbf{if}\;c \leq -3200000000000:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq -7.5 \cdot 10^{-253}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 4 \cdot 10^{-126}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 1.45 \cdot 10^{-50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 2.1 \cdot 10^{+133}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -3.2e12 or 2.1e133 < c Initial program 84.0%
Simplified82.1%
Taylor expanded in b around inf 41.6%
if -3.2e12 < c < -7.49999999999999987e-253 or 3.9999999999999998e-126 < c < 1.45000000000000004e-50Initial program 94.6%
Simplified95.9%
Taylor expanded in a around inf 38.7%
*-commutative38.7%
*-commutative38.7%
associate-*r*38.7%
Simplified38.7%
if -7.49999999999999987e-253 < c < 3.9999999999999998e-126 or 1.45000000000000004e-50 < c < 2.1e133Initial program 88.9%
Simplified89.0%
Taylor expanded in j around inf 39.0%
*-commutative39.0%
associate-*l*39.0%
Simplified39.0%
Final simplification39.9%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= b -7.5e+91) (not (<= b 2.8e-40))) (* b c) (* -4.0 (+ (* t a) (* 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 tmp;
if ((b <= -7.5e+91) || !(b <= 2.8e-40)) {
tmp = b * c;
} else {
tmp = -4.0 * ((t * a) + (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) :: tmp
if ((b <= (-7.5d+91)) .or. (.not. (b <= 2.8d-40))) then
tmp = b * c
else
tmp = (-4.0d0) * ((t * a) + (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 tmp;
if ((b <= -7.5e+91) || !(b <= 2.8e-40)) {
tmp = b * c;
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b <= -7.5e+91) or not (b <= 2.8e-40): tmp = b * c else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((b <= -7.5e+91) || !(b <= 2.8e-40)) tmp = Float64(b * c); else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b <= -7.5e+91) || ~((b <= 2.8e-40))) tmp = b * c; else tmp = -4.0 * ((t * a) + (x * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[b, -7.5e+91], N[Not[LessEqual[b, 2.8e-40]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+91} \lor \neg \left(b \leq 2.8 \cdot 10^{-40}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if b < -7.50000000000000033e91 or 2.8e-40 < b Initial program 88.4%
Simplified89.1%
Taylor expanded in b around inf 35.9%
if -7.50000000000000033e91 < b < 2.8e-40Initial program 88.9%
Taylor expanded in y around 0 75.4%
distribute-lft-out75.4%
*-commutative75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in j around 0 52.8%
Taylor expanded in c around 0 44.3%
Final simplification40.0%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= b -5e+52) (not (<= b 1.6e-105))) (- (* b c) (* 4.0 (* x i))) (* -4.0 (+ (* t a) (* 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 tmp;
if ((b <= -5e+52) || !(b <= 1.6e-105)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = -4.0 * ((t * a) + (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) :: tmp
if ((b <= (-5d+52)) .or. (.not. (b <= 1.6d-105))) then
tmp = (b * c) - (4.0d0 * (x * i))
else
tmp = (-4.0d0) * ((t * a) + (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 tmp;
if ((b <= -5e+52) || !(b <= 1.6e-105)) {
tmp = (b * c) - (4.0 * (x * i));
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b <= -5e+52) or not (b <= 1.6e-105): tmp = (b * c) - (4.0 * (x * i)) else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((b <= -5e+52) || !(b <= 1.6e-105)) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b <= -5e+52) || ~((b <= 1.6e-105))) tmp = (b * c) - (4.0 * (x * i)); else tmp = -4.0 * ((t * a) + (x * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[b, -5e+52], N[Not[LessEqual[b, 1.6e-105]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+52} \lor \neg \left(b \leq 1.6 \cdot 10^{-105}\right):\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if b < -5e52 or 1.59999999999999991e-105 < b Initial program 88.4%
Taylor expanded in t around 0 65.0%
Taylor expanded in j around 0 49.6%
if -5e52 < b < 1.59999999999999991e-105Initial program 89.1%
Taylor expanded in y around 0 75.0%
distribute-lft-out75.0%
*-commutative75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in j around 0 51.5%
Taylor expanded in c around 0 45.7%
Final simplification48.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= i -2.3e+168)
(- (* b c) (* 4.0 (* x i)))
(if (<= i 1.75e+27)
(- (* b c) (* t (* a 4.0)))
(* -4.0 (+ (* t a) (* 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 tmp;
if (i <= -2.3e+168) {
tmp = (b * c) - (4.0 * (x * i));
} else if (i <= 1.75e+27) {
tmp = (b * c) - (t * (a * 4.0));
} else {
tmp = -4.0 * ((t * a) + (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) :: tmp
if (i <= (-2.3d+168)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (i <= 1.75d+27) then
tmp = (b * c) - (t * (a * 4.0d0))
else
tmp = (-4.0d0) * ((t * a) + (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 tmp;
if (i <= -2.3e+168) {
tmp = (b * c) - (4.0 * (x * i));
} else if (i <= 1.75e+27) {
tmp = (b * c) - (t * (a * 4.0));
} else {
tmp = -4.0 * ((t * a) + (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if i <= -2.3e+168: tmp = (b * c) - (4.0 * (x * i)) elif i <= 1.75e+27: tmp = (b * c) - (t * (a * 4.0)) else: tmp = -4.0 * ((t * a) + (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (i <= -2.3e+168) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (i <= 1.75e+27) tmp = Float64(Float64(b * c) - Float64(t * Float64(a * 4.0))); else tmp = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (i <= -2.3e+168) tmp = (b * c) - (4.0 * (x * i)); elseif (i <= 1.75e+27) tmp = (b * c) - (t * (a * 4.0)); else tmp = -4.0 * ((t * a) + (x * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[i, -2.3e+168], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.75e+27], N[(N[(b * c), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.3 \cdot 10^{+168}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;i \leq 1.75 \cdot 10^{+27}:\\
\;\;\;\;b \cdot c - t \cdot \left(a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;-4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if i < -2.2999999999999999e168Initial program 93.4%
Taylor expanded in t around 0 83.3%
Taylor expanded in j around 0 61.5%
if -2.2999999999999999e168 < i < 1.7500000000000001e27Initial program 90.6%
Taylor expanded in y around 0 78.7%
distribute-lft-out78.7%
*-commutative78.7%
*-commutative78.7%
Simplified78.7%
Taylor expanded in j around 0 58.4%
Taylor expanded in i around 0 53.7%
*-commutative53.7%
*-commutative53.7%
associate-*l*53.7%
Simplified53.7%
if 1.7500000000000001e27 < i Initial program 79.9%
Taylor expanded in y around 0 73.5%
distribute-lft-out73.5%
*-commutative73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in j around 0 64.9%
Taylor expanded in c around 0 56.5%
Final simplification55.2%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= c -4.6e-179) (* b c) (if (<= c 2.2e+133) (* k (* j -27.0)) (* 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 (c <= -4.6e-179) {
tmp = b * c;
} else if (c <= 2.2e+133) {
tmp = k * (j * -27.0);
} 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 (c <= (-4.6d-179)) then
tmp = b * c
else if (c <= 2.2d+133) then
tmp = k * (j * (-27.0d0))
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 (c <= -4.6e-179) {
tmp = b * c;
} else if (c <= 2.2e+133) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -4.6e-179: tmp = b * c elif c <= 2.2e+133: tmp = k * (j * -27.0) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -4.6e-179) tmp = Float64(b * c); elseif (c <= 2.2e+133) tmp = Float64(k * Float64(j * -27.0)); 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 (c <= -4.6e-179) tmp = b * c; elseif (c <= 2.2e+133) tmp = k * (j * -27.0); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -4.6e-179], N[(b * c), $MachinePrecision], If[LessEqual[c, 2.2e+133], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.6 \cdot 10^{-179}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 2.2 \cdot 10^{+133}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -4.59999999999999975e-179 or 2.2e133 < c Initial program 87.9%
Simplified87.3%
Taylor expanded in b around inf 32.5%
if -4.59999999999999975e-179 < c < 2.2e133Initial program 89.5%
Simplified89.6%
Taylor expanded in j around inf 33.5%
*-commutative33.5%
associate-*l*33.5%
Simplified33.5%
Final simplification33.0%
(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 88.7%
Simplified88.4%
Taylor expanded in b around inf 23.2%
Final simplification23.2%
(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 2023268
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))