
(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 29 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
(-
(fma x (fma 18.0 (* z (* y t)) (* i -4.0)) (* b c))
(* 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 = (((((((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 = fma(x, fma(18.0, (z * (y * t)), (i * -4.0)), (b * c)) - (j * (27.0 * k));
}
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(fma(x, fma(18.0, Float64(z * Float64(y * t)), Float64(i * -4.0)), Float64(b * c)) - Float64(j * Float64(27.0 * k))); end return 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[(N[(x * N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $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}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(18, z \cdot \left(y \cdot t\right), i \cdot -4\right), b \cdot c\right) - j \cdot \left(27 \cdot k\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.0%
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%
Simplified20.8%
associate-*r*16.7%
distribute-rgt-out--0.0%
cancel-sign-sub-inv0.0%
associate-*l*4.2%
fma-def4.2%
associate-*l*4.2%
Applied egg-rr4.2%
Taylor expanded in a around 0 16.7%
associate--r+16.7%
Simplified66.7%
Final simplification94.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (+ (* i -4.0) (* 18.0 (* z (* y t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
}
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 * ((i * -4.0) + (18.0 * (z * (y * t))));
}
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 * ((i * -4.0) + (18.0 * (z * (y * t)))) 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(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))); 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 * ((i * -4.0) + (18.0 * (z * (y * t)))); 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[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $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(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 97.0%
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%
Simplified20.8%
associate--l+20.8%
*-commutative20.8%
fma-neg20.8%
fma-def20.8%
*-commutative20.8%
*-commutative20.8%
Applied egg-rr20.8%
Taylor expanded in x around inf 58.8%
cancel-sign-sub-inv58.8%
metadata-eval58.8%
associate-*r*62.9%
Simplified62.9%
Final simplification93.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* x (* z (* y t))))))
(if (<= (* b c) -6.2e+114)
(* b c)
(if (<= (* b c) -5.1e+63)
t_1
(if (<= (* b c) -5100.0)
t_2
(if (<= (* b c) -9.5e-29)
t_1
(if (<= (* b c) -9.6e-76)
(* k (* j -27.0))
(if (<= (* b c) 0.0)
t_2
(if (<= (* b c) 1.2e-195)
t_1
(if (<= (* b c) 1.4e+21)
(* (* j k) -27.0)
(if (<= (* b c) 2.3e+55)
(* t (* a -4.0))
(if (<= (* b c) 1.45e+82)
(* 18.0 (* t (* x (* y z))))
(* 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 = x * (i * -4.0);
double t_2 = 18.0 * (x * (z * (y * t)));
double tmp;
if ((b * c) <= -6.2e+114) {
tmp = b * c;
} else if ((b * c) <= -5.1e+63) {
tmp = t_1;
} else if ((b * c) <= -5100.0) {
tmp = t_2;
} else if ((b * c) <= -9.5e-29) {
tmp = t_1;
} else if ((b * c) <= -9.6e-76) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 0.0) {
tmp = t_2;
} else if ((b * c) <= 1.2e-195) {
tmp = t_1;
} else if ((b * c) <= 1.4e+21) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 2.3e+55) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 1.45e+82) {
tmp = 18.0 * (t * (x * (y * z)));
} 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 = x * (i * (-4.0d0))
t_2 = 18.0d0 * (x * (z * (y * t)))
if ((b * c) <= (-6.2d+114)) then
tmp = b * c
else if ((b * c) <= (-5.1d+63)) then
tmp = t_1
else if ((b * c) <= (-5100.0d0)) then
tmp = t_2
else if ((b * c) <= (-9.5d-29)) then
tmp = t_1
else if ((b * c) <= (-9.6d-76)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 0.0d0) then
tmp = t_2
else if ((b * c) <= 1.2d-195) then
tmp = t_1
else if ((b * c) <= 1.4d+21) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 2.3d+55) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 1.45d+82) then
tmp = 18.0d0 * (t * (x * (y * z)))
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 = x * (i * -4.0);
double t_2 = 18.0 * (x * (z * (y * t)));
double tmp;
if ((b * c) <= -6.2e+114) {
tmp = b * c;
} else if ((b * c) <= -5.1e+63) {
tmp = t_1;
} else if ((b * c) <= -5100.0) {
tmp = t_2;
} else if ((b * c) <= -9.5e-29) {
tmp = t_1;
} else if ((b * c) <= -9.6e-76) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 0.0) {
tmp = t_2;
} else if ((b * c) <= 1.2e-195) {
tmp = t_1;
} else if ((b * c) <= 1.4e+21) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 2.3e+55) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 1.45e+82) {
tmp = 18.0 * (t * (x * (y * z)));
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) t_2 = 18.0 * (x * (z * (y * t))) tmp = 0 if (b * c) <= -6.2e+114: tmp = b * c elif (b * c) <= -5.1e+63: tmp = t_1 elif (b * c) <= -5100.0: tmp = t_2 elif (b * c) <= -9.5e-29: tmp = t_1 elif (b * c) <= -9.6e-76: tmp = k * (j * -27.0) elif (b * c) <= 0.0: tmp = t_2 elif (b * c) <= 1.2e-195: tmp = t_1 elif (b * c) <= 1.4e+21: tmp = (j * k) * -27.0 elif (b * c) <= 2.3e+55: tmp = t * (a * -4.0) elif (b * c) <= 1.45e+82: tmp = 18.0 * (t * (x * (y * z))) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) t_2 = Float64(18.0 * Float64(x * Float64(z * Float64(y * t)))) tmp = 0.0 if (Float64(b * c) <= -6.2e+114) tmp = Float64(b * c); elseif (Float64(b * c) <= -5.1e+63) tmp = t_1; elseif (Float64(b * c) <= -5100.0) tmp = t_2; elseif (Float64(b * c) <= -9.5e-29) tmp = t_1; elseif (Float64(b * c) <= -9.6e-76) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 0.0) tmp = t_2; elseif (Float64(b * c) <= 1.2e-195) tmp = t_1; elseif (Float64(b * c) <= 1.4e+21) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 2.3e+55) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 1.45e+82) tmp = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))); 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 = x * (i * -4.0); t_2 = 18.0 * (x * (z * (y * t))); tmp = 0.0; if ((b * c) <= -6.2e+114) tmp = b * c; elseif ((b * c) <= -5.1e+63) tmp = t_1; elseif ((b * c) <= -5100.0) tmp = t_2; elseif ((b * c) <= -9.5e-29) tmp = t_1; elseif ((b * c) <= -9.6e-76) tmp = k * (j * -27.0); elseif ((b * c) <= 0.0) tmp = t_2; elseif ((b * c) <= 1.2e-195) tmp = t_1; elseif ((b * c) <= 1.4e+21) tmp = (j * k) * -27.0; elseif ((b * c) <= 2.3e+55) tmp = t * (a * -4.0); elseif ((b * c) <= 1.45e+82) tmp = 18.0 * (t * (x * (y * z))); 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[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+114], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.1e+63], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5100.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -9.5e-29], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -9.6e-76], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 0.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.2e-195], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.4e+21], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+55], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.45e+82], N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -5.1 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -5100:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -9.5 \cdot 10^{-29}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -9.6 \cdot 10^{-76}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{-195}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 1.4 \cdot 10^{+21}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+55}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.45 \cdot 10^{+82}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.2000000000000001e114 or 1.4500000000000001e82 < (*.f64 b c) Initial program 85.0%
Simplified86.1%
associate--l+86.1%
*-commutative86.1%
fma-neg86.1%
fma-def86.1%
*-commutative86.1%
*-commutative86.1%
Applied egg-rr86.1%
Taylor expanded in b around inf 62.0%
if -6.2000000000000001e114 < (*.f64 b c) < -5.0999999999999998e63 or -5100 < (*.f64 b c) < -9.50000000000000023e-29 or -0.0 < (*.f64 b c) < 1.2e-195Initial program 91.1%
Simplified91.3%
associate--l+91.3%
*-commutative91.3%
fma-neg91.3%
fma-def91.3%
*-commutative91.3%
*-commutative91.3%
Applied egg-rr91.3%
Taylor expanded in i around inf 51.9%
associate-*r*51.9%
Simplified51.9%
if -5.0999999999999998e63 < (*.f64 b c) < -5100 or -9.60000000000000053e-76 < (*.f64 b c) < -0.0Initial program 88.1%
Simplified89.5%
associate--l+89.5%
*-commutative89.5%
fma-neg89.5%
fma-def89.5%
*-commutative89.5%
*-commutative89.5%
Applied egg-rr89.5%
Taylor expanded in y around inf 41.3%
associate-*r*41.3%
*-commutative41.3%
*-commutative41.3%
Simplified41.3%
Taylor expanded in y around 0 41.3%
*-commutative41.3%
associate-*l*41.4%
*-commutative41.4%
associate-*r*42.5%
*-commutative42.5%
Simplified42.5%
if -9.50000000000000023e-29 < (*.f64 b c) < -9.60000000000000053e-76Initial program 80.6%
Simplified80.8%
associate-*r*87.3%
distribute-rgt-out--80.6%
cancel-sign-sub-inv80.6%
associate-*l*86.7%
fma-def86.7%
associate-*l*86.7%
Applied egg-rr86.7%
Taylor expanded in a around 0 74.2%
associate--r+74.2%
Simplified86.9%
Taylor expanded in j around inf 54.5%
*-commutative54.5%
*-commutative54.5%
associate-*r*54.6%
Simplified54.6%
if 1.2e-195 < (*.f64 b c) < 1.4e21Initial program 94.4%
Simplified86.6%
Taylor expanded in j around inf 37.7%
if 1.4e21 < (*.f64 b c) < 2.29999999999999987e55Initial program 100.0%
Simplified100.0%
associate--l+100.0%
*-commutative100.0%
fma-neg100.0%
fma-def100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 61.4%
metadata-eval61.4%
distribute-lft-neg-in61.4%
associate-*r*61.4%
*-commutative61.4%
*-commutative61.4%
distribute-rgt-neg-in61.4%
*-rgt-identity61.4%
*-rgt-identity61.4%
*-commutative61.4%
distribute-lft-neg-in61.4%
metadata-eval61.4%
Simplified61.4%
if 2.29999999999999987e55 < (*.f64 b c) < 1.4500000000000001e82Initial program 80.0%
Simplified80.0%
associate--l+80.0%
*-commutative80.0%
fma-neg80.0%
fma-def80.0%
*-commutative80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in y around inf 99.4%
Final simplification52.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* x (* z (* y t))))))
(if (<= (* b c) -6.2e+114)
(* b c)
(if (<= (* b c) -4.4e+63)
t_1
(if (<= (* b c) -2100.0)
t_2
(if (<= (* b c) -3.8e-25)
t_1
(if (<= (* b c) -5.5e-72)
(* k (* j -27.0))
(if (<= (* b c) 0.0)
t_2
(if (<= (* b c) 2.8e-190)
t_1
(if (<= (* b c) 5.5e+22)
(* (* j k) -27.0)
(if (<= (* b c) 9.8e+54)
(* t (* a -4.0))
(if (<= (* b c) 2.7e+80)
(* 18.0 (* (* y z) (* x t)))
(* 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 = x * (i * -4.0);
double t_2 = 18.0 * (x * (z * (y * t)));
double tmp;
if ((b * c) <= -6.2e+114) {
tmp = b * c;
} else if ((b * c) <= -4.4e+63) {
tmp = t_1;
} else if ((b * c) <= -2100.0) {
tmp = t_2;
} else if ((b * c) <= -3.8e-25) {
tmp = t_1;
} else if ((b * c) <= -5.5e-72) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 0.0) {
tmp = t_2;
} else if ((b * c) <= 2.8e-190) {
tmp = t_1;
} else if ((b * c) <= 5.5e+22) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 9.8e+54) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 2.7e+80) {
tmp = 18.0 * ((y * z) * (x * t));
} 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 = x * (i * (-4.0d0))
t_2 = 18.0d0 * (x * (z * (y * t)))
if ((b * c) <= (-6.2d+114)) then
tmp = b * c
else if ((b * c) <= (-4.4d+63)) then
tmp = t_1
else if ((b * c) <= (-2100.0d0)) then
tmp = t_2
else if ((b * c) <= (-3.8d-25)) then
tmp = t_1
else if ((b * c) <= (-5.5d-72)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 0.0d0) then
tmp = t_2
else if ((b * c) <= 2.8d-190) then
tmp = t_1
else if ((b * c) <= 5.5d+22) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 9.8d+54) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 2.7d+80) then
tmp = 18.0d0 * ((y * z) * (x * t))
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 = x * (i * -4.0);
double t_2 = 18.0 * (x * (z * (y * t)));
double tmp;
if ((b * c) <= -6.2e+114) {
tmp = b * c;
} else if ((b * c) <= -4.4e+63) {
tmp = t_1;
} else if ((b * c) <= -2100.0) {
tmp = t_2;
} else if ((b * c) <= -3.8e-25) {
tmp = t_1;
} else if ((b * c) <= -5.5e-72) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 0.0) {
tmp = t_2;
} else if ((b * c) <= 2.8e-190) {
tmp = t_1;
} else if ((b * c) <= 5.5e+22) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 9.8e+54) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 2.7e+80) {
tmp = 18.0 * ((y * z) * (x * t));
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) t_2 = 18.0 * (x * (z * (y * t))) tmp = 0 if (b * c) <= -6.2e+114: tmp = b * c elif (b * c) <= -4.4e+63: tmp = t_1 elif (b * c) <= -2100.0: tmp = t_2 elif (b * c) <= -3.8e-25: tmp = t_1 elif (b * c) <= -5.5e-72: tmp = k * (j * -27.0) elif (b * c) <= 0.0: tmp = t_2 elif (b * c) <= 2.8e-190: tmp = t_1 elif (b * c) <= 5.5e+22: tmp = (j * k) * -27.0 elif (b * c) <= 9.8e+54: tmp = t * (a * -4.0) elif (b * c) <= 2.7e+80: tmp = 18.0 * ((y * z) * (x * t)) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) t_2 = Float64(18.0 * Float64(x * Float64(z * Float64(y * t)))) tmp = 0.0 if (Float64(b * c) <= -6.2e+114) tmp = Float64(b * c); elseif (Float64(b * c) <= -4.4e+63) tmp = t_1; elseif (Float64(b * c) <= -2100.0) tmp = t_2; elseif (Float64(b * c) <= -3.8e-25) tmp = t_1; elseif (Float64(b * c) <= -5.5e-72) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 0.0) tmp = t_2; elseif (Float64(b * c) <= 2.8e-190) tmp = t_1; elseif (Float64(b * c) <= 5.5e+22) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 9.8e+54) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 2.7e+80) tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))); 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 = x * (i * -4.0); t_2 = 18.0 * (x * (z * (y * t))); tmp = 0.0; if ((b * c) <= -6.2e+114) tmp = b * c; elseif ((b * c) <= -4.4e+63) tmp = t_1; elseif ((b * c) <= -2100.0) tmp = t_2; elseif ((b * c) <= -3.8e-25) tmp = t_1; elseif ((b * c) <= -5.5e-72) tmp = k * (j * -27.0); elseif ((b * c) <= 0.0) tmp = t_2; elseif ((b * c) <= 2.8e-190) tmp = t_1; elseif ((b * c) <= 5.5e+22) tmp = (j * k) * -27.0; elseif ((b * c) <= 9.8e+54) tmp = t * (a * -4.0); elseif ((b * c) <= 2.7e+80) tmp = 18.0 * ((y * z) * (x * t)); 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[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+114], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.4e+63], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2100.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -3.8e-25], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5.5e-72], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 0.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 2.8e-190], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5.5e+22], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.8e+54], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.7e+80], N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -4.4 \cdot 10^{+63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -2100:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{-72}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 2.8 \cdot 10^{-190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 5.5 \cdot 10^{+22}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 9.8 \cdot 10^{+54}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+80}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.2000000000000001e114 or 2.69999999999999983e80 < (*.f64 b c) Initial program 85.0%
Simplified86.1%
associate--l+86.1%
*-commutative86.1%
fma-neg86.1%
fma-def86.1%
*-commutative86.1%
*-commutative86.1%
Applied egg-rr86.1%
Taylor expanded in b around inf 62.0%
if -6.2000000000000001e114 < (*.f64 b c) < -4.3999999999999997e63 or -2100 < (*.f64 b c) < -3.7999999999999998e-25 or -0.0 < (*.f64 b c) < 2.80000000000000005e-190Initial program 91.1%
Simplified91.3%
associate--l+91.3%
*-commutative91.3%
fma-neg91.3%
fma-def91.3%
*-commutative91.3%
*-commutative91.3%
Applied egg-rr91.3%
Taylor expanded in i around inf 51.9%
associate-*r*51.9%
Simplified51.9%
if -4.3999999999999997e63 < (*.f64 b c) < -2100 or -5.49999999999999994e-72 < (*.f64 b c) < -0.0Initial program 88.1%
Simplified89.5%
associate--l+89.5%
*-commutative89.5%
fma-neg89.5%
fma-def89.5%
*-commutative89.5%
*-commutative89.5%
Applied egg-rr89.5%
Taylor expanded in y around inf 41.3%
associate-*r*41.3%
*-commutative41.3%
*-commutative41.3%
Simplified41.3%
Taylor expanded in y around 0 41.3%
*-commutative41.3%
associate-*l*41.4%
*-commutative41.4%
associate-*r*42.5%
*-commutative42.5%
Simplified42.5%
if -3.7999999999999998e-25 < (*.f64 b c) < -5.49999999999999994e-72Initial program 80.6%
Simplified80.8%
associate-*r*87.3%
distribute-rgt-out--80.6%
cancel-sign-sub-inv80.6%
associate-*l*86.7%
fma-def86.7%
associate-*l*86.7%
Applied egg-rr86.7%
Taylor expanded in a around 0 74.2%
associate--r+74.2%
Simplified86.9%
Taylor expanded in j around inf 54.5%
*-commutative54.5%
*-commutative54.5%
associate-*r*54.6%
Simplified54.6%
if 2.80000000000000005e-190 < (*.f64 b c) < 5.50000000000000021e22Initial program 94.4%
Simplified86.6%
Taylor expanded in j around inf 37.7%
if 5.50000000000000021e22 < (*.f64 b c) < 9.80000000000000002e54Initial program 100.0%
Simplified100.0%
associate--l+100.0%
*-commutative100.0%
fma-neg100.0%
fma-def100.0%
*-commutative100.0%
*-commutative100.0%
Applied egg-rr100.0%
Taylor expanded in a around inf 61.4%
metadata-eval61.4%
distribute-lft-neg-in61.4%
associate-*r*61.4%
*-commutative61.4%
*-commutative61.4%
distribute-rgt-neg-in61.4%
*-rgt-identity61.4%
*-rgt-identity61.4%
*-commutative61.4%
distribute-lft-neg-in61.4%
metadata-eval61.4%
Simplified61.4%
if 9.80000000000000002e54 < (*.f64 b c) < 2.69999999999999983e80Initial program 80.0%
Simplified80.0%
associate--l+80.0%
*-commutative80.0%
fma-neg80.0%
fma-def80.0%
*-commutative80.0%
*-commutative80.0%
Applied egg-rr80.0%
Taylor expanded in y around inf 99.4%
associate-*r*100.0%
*-commutative100.0%
*-commutative100.0%
Simplified100.0%
Final simplification52.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 4.0 (* x i)))
(t_2 (* x (* y z)))
(t_3 (* (* j 27.0) k))
(t_4 (* 4.0 (* t a))))
(if (<= t_3 -2e+120)
(- (+ (* b c) (* (* 18.0 t) t_2)) (+ (* j (* 27.0 k)) (* x (* 4.0 i))))
(if (<= t_3 2e-277)
(- (+ (* b c) (* t (- (* 18.0 t_2) (* a 4.0)))) t_1)
(if (or (<= t_3 1e-35) (not (<= t_3 1e+114)))
(- (- (* b c) (+ t_4 t_1)) t_3)
(- (- (+ (* b c) (* 18.0 (* t t_2))) t_4) t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = x * (y * z);
double t_3 = (j * 27.0) * k;
double t_4 = 4.0 * (t * a);
double tmp;
if (t_3 <= -2e+120) {
tmp = ((b * c) + ((18.0 * t) * t_2)) - ((j * (27.0 * k)) + (x * (4.0 * i)));
} else if (t_3 <= 2e-277) {
tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_1;
} else if ((t_3 <= 1e-35) || !(t_3 <= 1e+114)) {
tmp = ((b * c) - (t_4 + t_1)) - t_3;
} else {
tmp = (((b * c) + (18.0 * (t * t_2))) - t_4) - t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = 4.0d0 * (x * i)
t_2 = x * (y * z)
t_3 = (j * 27.0d0) * k
t_4 = 4.0d0 * (t * a)
if (t_3 <= (-2d+120)) then
tmp = ((b * c) + ((18.0d0 * t) * t_2)) - ((j * (27.0d0 * k)) + (x * (4.0d0 * i)))
else if (t_3 <= 2d-277) then
tmp = ((b * c) + (t * ((18.0d0 * t_2) - (a * 4.0d0)))) - t_1
else if ((t_3 <= 1d-35) .or. (.not. (t_3 <= 1d+114))) then
tmp = ((b * c) - (t_4 + t_1)) - t_3
else
tmp = (((b * c) + (18.0d0 * (t * t_2))) - t_4) - t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = 4.0 * (x * i);
double t_2 = x * (y * z);
double t_3 = (j * 27.0) * k;
double t_4 = 4.0 * (t * a);
double tmp;
if (t_3 <= -2e+120) {
tmp = ((b * c) + ((18.0 * t) * t_2)) - ((j * (27.0 * k)) + (x * (4.0 * i)));
} else if (t_3 <= 2e-277) {
tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_1;
} else if ((t_3 <= 1e-35) || !(t_3 <= 1e+114)) {
tmp = ((b * c) - (t_4 + t_1)) - t_3;
} else {
tmp = (((b * c) + (18.0 * (t * t_2))) - t_4) - t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = 4.0 * (x * i) t_2 = x * (y * z) t_3 = (j * 27.0) * k t_4 = 4.0 * (t * a) tmp = 0 if t_3 <= -2e+120: tmp = ((b * c) + ((18.0 * t) * t_2)) - ((j * (27.0 * k)) + (x * (4.0 * i))) elif t_3 <= 2e-277: tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_1 elif (t_3 <= 1e-35) or not (t_3 <= 1e+114): tmp = ((b * c) - (t_4 + t_1)) - t_3 else: tmp = (((b * c) + (18.0 * (t * t_2))) - t_4) - t_3 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(4.0 * Float64(x * i)) t_2 = Float64(x * Float64(y * z)) t_3 = Float64(Float64(j * 27.0) * k) t_4 = Float64(4.0 * Float64(t * a)) tmp = 0.0 if (t_3 <= -2e+120) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(18.0 * t) * t_2)) - Float64(Float64(j * Float64(27.0 * k)) + Float64(x * Float64(4.0 * i)))); elseif (t_3 <= 2e-277) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * t_2) - Float64(a * 4.0)))) - t_1); elseif ((t_3 <= 1e-35) || !(t_3 <= 1e+114)) tmp = Float64(Float64(Float64(b * c) - Float64(t_4 + t_1)) - t_3); else tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_2))) - t_4) - t_3); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = 4.0 * (x * i); t_2 = x * (y * z); t_3 = (j * 27.0) * k; t_4 = 4.0 * (t * a); tmp = 0.0; if (t_3 <= -2e+120) tmp = ((b * c) + ((18.0 * t) * t_2)) - ((j * (27.0 * k)) + (x * (4.0 * i))); elseif (t_3 <= 2e-277) tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_1; elseif ((t_3 <= 1e-35) || ~((t_3 <= 1e+114))) tmp = ((b * c) - (t_4 + t_1)) - t_3; else tmp = (((b * c) + (18.0 * (t * t_2))) - t_4) - t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$4 = N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+120], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(18.0 * t), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e-277], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * t$95$2), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[Or[LessEqual[t$95$3, 1e-35], N[Not[LessEqual[t$95$3, 1e+114]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(t$95$4 + t$95$1), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision] - t$95$3), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 4 \cdot \left(x \cdot i\right)\\
t_2 := x \cdot \left(y \cdot z\right)\\
t_3 := \left(j \cdot 27\right) \cdot k\\
t_4 := 4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t_3 \leq -2 \cdot 10^{+120}:\\
\;\;\;\;\left(b \cdot c + \left(18 \cdot t\right) \cdot t_2\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\right)\\
\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-277}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\right) - t_1\\
\mathbf{elif}\;t_3 \leq 10^{-35} \lor \neg \left(t_3 \leq 10^{+114}\right):\\
\;\;\;\;\left(b \cdot c - \left(t_4 + t_1\right)\right) - t_3\\
\mathbf{else}:\\
\;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(t \cdot t_2\right)\right) - t_4\right) - t_3\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -2e120Initial program 94.4%
Simplified97.3%
associate-*r*94.4%
distribute-rgt-out--94.4%
cancel-sign-sub-inv94.4%
associate-*l*94.2%
fma-def94.2%
associate-*l*94.2%
Applied egg-rr94.2%
Taylor expanded in x around inf 94.5%
associate-*r*94.5%
*-commutative94.5%
Simplified94.5%
if -2e120 < (*.f64 (*.f64 j 27) k) < 1.99999999999999994e-277Initial program 87.9%
Simplified90.4%
Taylor expanded in j around 0 86.6%
if 1.99999999999999994e-277 < (*.f64 (*.f64 j 27) k) < 1.00000000000000001e-35 or 1e114 < (*.f64 (*.f64 j 27) k) Initial program 82.5%
Taylor expanded in y around 0 91.0%
if 1.00000000000000001e-35 < (*.f64 (*.f64 j 27) k) < 1e114Initial program 93.6%
Taylor expanded in i around 0 99.9%
Final simplification90.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))) (t_2 (* 18.0 (* t (* x (* y z))))))
(if (<= (* b c) -2.3e+115)
(* b c)
(if (<= (* b c) -1.16e+64)
t_1
(if (<= (* b c) -3.8e-16)
t_2
(if (<= (* b c) -2.4e-26)
t_1
(if (<= (* b c) -7e-74)
(* k (* j -27.0))
(if (<= (* b c) 0.0)
t_2
(if (<= (* b c) 1.95e-190)
t_1
(if (<= (* b c) 1.7e+56)
(* (* j k) -27.0)
(if (<= (* b c) 2.5e+82) 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 = x * (i * -4.0);
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if ((b * c) <= -2.3e+115) {
tmp = b * c;
} else if ((b * c) <= -1.16e+64) {
tmp = t_1;
} else if ((b * c) <= -3.8e-16) {
tmp = t_2;
} else if ((b * c) <= -2.4e-26) {
tmp = t_1;
} else if ((b * c) <= -7e-74) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 0.0) {
tmp = t_2;
} else if ((b * c) <= 1.95e-190) {
tmp = t_1;
} else if ((b * c) <= 1.7e+56) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 2.5e+82) {
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 = x * (i * (-4.0d0))
t_2 = 18.0d0 * (t * (x * (y * z)))
if ((b * c) <= (-2.3d+115)) then
tmp = b * c
else if ((b * c) <= (-1.16d+64)) then
tmp = t_1
else if ((b * c) <= (-3.8d-16)) then
tmp = t_2
else if ((b * c) <= (-2.4d-26)) then
tmp = t_1
else if ((b * c) <= (-7d-74)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 0.0d0) then
tmp = t_2
else if ((b * c) <= 1.95d-190) then
tmp = t_1
else if ((b * c) <= 1.7d+56) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 2.5d+82) 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 = x * (i * -4.0);
double t_2 = 18.0 * (t * (x * (y * z)));
double tmp;
if ((b * c) <= -2.3e+115) {
tmp = b * c;
} else if ((b * c) <= -1.16e+64) {
tmp = t_1;
} else if ((b * c) <= -3.8e-16) {
tmp = t_2;
} else if ((b * c) <= -2.4e-26) {
tmp = t_1;
} else if ((b * c) <= -7e-74) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 0.0) {
tmp = t_2;
} else if ((b * c) <= 1.95e-190) {
tmp = t_1;
} else if ((b * c) <= 1.7e+56) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 2.5e+82) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) t_2 = 18.0 * (t * (x * (y * z))) tmp = 0 if (b * c) <= -2.3e+115: tmp = b * c elif (b * c) <= -1.16e+64: tmp = t_1 elif (b * c) <= -3.8e-16: tmp = t_2 elif (b * c) <= -2.4e-26: tmp = t_1 elif (b * c) <= -7e-74: tmp = k * (j * -27.0) elif (b * c) <= 0.0: tmp = t_2 elif (b * c) <= 1.95e-190: tmp = t_1 elif (b * c) <= 1.7e+56: tmp = (j * k) * -27.0 elif (b * c) <= 2.5e+82: tmp = t_2 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) t_2 = Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) tmp = 0.0 if (Float64(b * c) <= -2.3e+115) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.16e+64) tmp = t_1; elseif (Float64(b * c) <= -3.8e-16) tmp = t_2; elseif (Float64(b * c) <= -2.4e-26) tmp = t_1; elseif (Float64(b * c) <= -7e-74) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 0.0) tmp = t_2; elseif (Float64(b * c) <= 1.95e-190) tmp = t_1; elseif (Float64(b * c) <= 1.7e+56) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 2.5e+82) 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 = x * (i * -4.0); t_2 = 18.0 * (t * (x * (y * z))); tmp = 0.0; if ((b * c) <= -2.3e+115) tmp = b * c; elseif ((b * c) <= -1.16e+64) tmp = t_1; elseif ((b * c) <= -3.8e-16) tmp = t_2; elseif ((b * c) <= -2.4e-26) tmp = t_1; elseif ((b * c) <= -7e-74) tmp = k * (j * -27.0); elseif ((b * c) <= 0.0) tmp = t_2; elseif ((b * c) <= 1.95e-190) tmp = t_1; elseif ((b * c) <= 1.7e+56) tmp = (j * k) * -27.0; elseif ((b * c) <= 2.5e+82) 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[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.3e+115], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.16e+64], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -3.8e-16], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -2.4e-26], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -7e-74], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 0.0], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.95e-190], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.7e+56], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.5e+82], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
t_2 := 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -2.3 \cdot 10^{+115}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.16 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -3.8 \cdot 10^{-16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -2.4 \cdot 10^{-26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -7 \cdot 10^{-74}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 0:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{-190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{+56}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 2.5 \cdot 10^{+82}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.30000000000000004e115 or 2.50000000000000008e82 < (*.f64 b c) Initial program 85.0%
Simplified86.1%
associate--l+86.1%
*-commutative86.1%
fma-neg86.1%
fma-def86.1%
*-commutative86.1%
*-commutative86.1%
Applied egg-rr86.1%
Taylor expanded in b around inf 62.0%
if -2.30000000000000004e115 < (*.f64 b c) < -1.16e64 or -3.80000000000000012e-16 < (*.f64 b c) < -2.4000000000000001e-26 or -0.0 < (*.f64 b c) < 1.94999999999999997e-190Initial program 93.4%
Simplified93.7%
associate--l+93.7%
*-commutative93.7%
fma-neg93.7%
fma-def93.7%
*-commutative93.7%
*-commutative93.7%
Applied egg-rr93.7%
Taylor expanded in i around inf 53.5%
associate-*r*53.5%
Simplified53.5%
if -1.16e64 < (*.f64 b c) < -3.80000000000000012e-16 or -7.00000000000000029e-74 < (*.f64 b c) < -0.0 or 1.7e56 < (*.f64 b c) < 2.50000000000000008e82Initial program 86.7%
Simplified87.9%
associate--l+87.9%
*-commutative87.9%
fma-neg87.9%
fma-def88.0%
*-commutative88.0%
*-commutative88.0%
Applied egg-rr88.0%
Taylor expanded in y around inf 45.0%
if -2.4000000000000001e-26 < (*.f64 b c) < -7.00000000000000029e-74Initial program 80.6%
Simplified80.8%
associate-*r*87.3%
distribute-rgt-out--80.6%
cancel-sign-sub-inv80.6%
associate-*l*86.7%
fma-def86.7%
associate-*l*86.7%
Applied egg-rr86.7%
Taylor expanded in a around 0 74.2%
associate--r+74.2%
Simplified86.9%
Taylor expanded in j around inf 54.5%
*-commutative54.5%
*-commutative54.5%
associate-*r*54.6%
Simplified54.6%
if 1.94999999999999997e-190 < (*.f64 b c) < 1.7e56Initial program 95.1%
Simplified88.2%
Taylor expanded in j around inf 33.5%
Final simplification50.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)) (t_2 (* x (* y z))) (t_3 (* 4.0 (* x i))))
(if (<= t_1 -2e+120)
(- (+ (* b c) (* 18.0 (* t t_2))) t_1)
(if (<= t_1 2e-277)
(- (+ (* b c) (* t (- (* 18.0 t_2) (* a 4.0)))) t_3)
(if (or (<= t_1 5e-35) (not (<= t_1 200000000.0)))
(- (- (* b c) (+ (* 4.0 (* t a)) t_3)) t_1)
(+ (* 18.0 (* y (* z (* x t)))) (- (* b c) (* 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 = (j * 27.0) * k;
double t_2 = x * (y * z);
double t_3 = 4.0 * (x * i);
double tmp;
if (t_1 <= -2e+120) {
tmp = ((b * c) + (18.0 * (t * t_2))) - t_1;
} else if (t_1 <= 2e-277) {
tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_3;
} else if ((t_1 <= 5e-35) || !(t_1 <= 200000000.0)) {
tmp = ((b * c) - ((4.0 * (t * a)) + t_3)) - t_1;
} else {
tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (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) :: t_3
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = x * (y * z)
t_3 = 4.0d0 * (x * i)
if (t_1 <= (-2d+120)) then
tmp = ((b * c) + (18.0d0 * (t * t_2))) - t_1
else if (t_1 <= 2d-277) then
tmp = ((b * c) + (t * ((18.0d0 * t_2) - (a * 4.0d0)))) - t_3
else if ((t_1 <= 5d-35) .or. (.not. (t_1 <= 200000000.0d0))) then
tmp = ((b * c) - ((4.0d0 * (t * a)) + t_3)) - t_1
else
tmp = (18.0d0 * (y * (z * (x * t)))) + ((b * c) - (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 = (j * 27.0) * k;
double t_2 = x * (y * z);
double t_3 = 4.0 * (x * i);
double tmp;
if (t_1 <= -2e+120) {
tmp = ((b * c) + (18.0 * (t * t_2))) - t_1;
} else if (t_1 <= 2e-277) {
tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_3;
} else if ((t_1 <= 5e-35) || !(t_1 <= 200000000.0)) {
tmp = ((b * c) - ((4.0 * (t * a)) + t_3)) - t_1;
} else {
tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = x * (y * z) t_3 = 4.0 * (x * i) tmp = 0 if t_1 <= -2e+120: tmp = ((b * c) + (18.0 * (t * t_2))) - t_1 elif t_1 <= 2e-277: tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_3 elif (t_1 <= 5e-35) or not (t_1 <= 200000000.0): tmp = ((b * c) - ((4.0 * (t * a)) + t_3)) - t_1 else: tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k))) 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(x * Float64(y * z)) t_3 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t_1 <= -2e+120) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_2))) - t_1); elseif (t_1 <= 2e-277) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * t_2) - Float64(a * 4.0)))) - t_3); elseif ((t_1 <= 5e-35) || !(t_1 <= 200000000.0)) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + t_3)) - t_1); else tmp = Float64(Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))) + Float64(Float64(b * c) - 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 = (j * 27.0) * k; t_2 = x * (y * z); t_3 = 4.0 * (x * i); tmp = 0.0; if (t_1 <= -2e+120) tmp = ((b * c) + (18.0 * (t * t_2))) - t_1; elseif (t_1 <= 2e-277) tmp = ((b * c) + (t * ((18.0 * t_2) - (a * 4.0)))) - t_3; elseif ((t_1 <= 5e-35) || ~((t_1 <= 200000000.0))) tmp = ((b * c) - ((4.0 * (t * a)) + t_3)) - t_1; else tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (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[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+120], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 2e-277], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * t$95$2), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], If[Or[LessEqual[t$95$1, 5e-35], N[Not[LessEqual[t$95$1, 200000000.0]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(y \cdot z\right)\\
t_3 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+120}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot t_2\right)\right) - t_1\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-277}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_2 - a \cdot 4\right)\right) - t_3\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-35} \lor \neg \left(t_1 \leq 200000000\right):\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + t_3\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -2e120Initial program 94.4%
Taylor expanded in i around 0 94.4%
Taylor expanded in a around 0 94.4%
if -2e120 < (*.f64 (*.f64 j 27) k) < 1.99999999999999994e-277Initial program 87.9%
Simplified90.4%
Taylor expanded in j around 0 86.6%
if 1.99999999999999994e-277 < (*.f64 (*.f64 j 27) k) < 4.99999999999999964e-35 or 2e8 < (*.f64 (*.f64 j 27) k) Initial program 84.9%
Taylor expanded in y around 0 90.1%
if 4.99999999999999964e-35 < (*.f64 (*.f64 j 27) k) < 2e8Initial program 92.2%
Taylor expanded in i around 0 99.9%
Taylor expanded in a around 0 99.9%
associate--l+99.9%
associate-*r*99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
Final simplification89.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* y z)))
(t_2 (* (* j 27.0) k))
(t_3 (* j (* 27.0 k)))
(t_4 (* 4.0 (* x i))))
(if (<= t_2 -2e+120)
(- (+ (* b c) (* (* 18.0 t) t_1)) (+ t_3 (* x (* 4.0 i))))
(if (<= t_2 2e-277)
(- (+ (* b c) (* t (- (* 18.0 t_1) (* a 4.0)))) t_4)
(if (or (<= t_2 5e-35) (not (<= t_2 200000000.0)))
(- (- (* b c) (+ (* 4.0 (* t a)) t_4)) t_2)
(+ (* 18.0 (* y (* z (* x t)))) (- (* b c) t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (y * z);
double t_2 = (j * 27.0) * k;
double t_3 = j * (27.0 * k);
double t_4 = 4.0 * (x * i);
double tmp;
if (t_2 <= -2e+120) {
tmp = ((b * c) + ((18.0 * t) * t_1)) - (t_3 + (x * (4.0 * i)));
} else if (t_2 <= 2e-277) {
tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_4;
} else if ((t_2 <= 5e-35) || !(t_2 <= 200000000.0)) {
tmp = ((b * c) - ((4.0 * (t * a)) + t_4)) - t_2;
} else {
tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - t_3);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = x * (y * z)
t_2 = (j * 27.0d0) * k
t_3 = j * (27.0d0 * k)
t_4 = 4.0d0 * (x * i)
if (t_2 <= (-2d+120)) then
tmp = ((b * c) + ((18.0d0 * t) * t_1)) - (t_3 + (x * (4.0d0 * i)))
else if (t_2 <= 2d-277) then
tmp = ((b * c) + (t * ((18.0d0 * t_1) - (a * 4.0d0)))) - t_4
else if ((t_2 <= 5d-35) .or. (.not. (t_2 <= 200000000.0d0))) then
tmp = ((b * c) - ((4.0d0 * (t * a)) + t_4)) - t_2
else
tmp = (18.0d0 * (y * (z * (x * t)))) + ((b * c) - t_3)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * (y * z);
double t_2 = (j * 27.0) * k;
double t_3 = j * (27.0 * k);
double t_4 = 4.0 * (x * i);
double tmp;
if (t_2 <= -2e+120) {
tmp = ((b * c) + ((18.0 * t) * t_1)) - (t_3 + (x * (4.0 * i)));
} else if (t_2 <= 2e-277) {
tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_4;
} else if ((t_2 <= 5e-35) || !(t_2 <= 200000000.0)) {
tmp = ((b * c) - ((4.0 * (t * a)) + t_4)) - t_2;
} else {
tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - t_3);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (y * z) t_2 = (j * 27.0) * k t_3 = j * (27.0 * k) t_4 = 4.0 * (x * i) tmp = 0 if t_2 <= -2e+120: tmp = ((b * c) + ((18.0 * t) * t_1)) - (t_3 + (x * (4.0 * i))) elif t_2 <= 2e-277: tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_4 elif (t_2 <= 5e-35) or not (t_2 <= 200000000.0): tmp = ((b * c) - ((4.0 * (t * a)) + t_4)) - t_2 else: tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - t_3) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(y * z)) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(j * Float64(27.0 * k)) t_4 = Float64(4.0 * Float64(x * i)) tmp = 0.0 if (t_2 <= -2e+120) tmp = Float64(Float64(Float64(b * c) + Float64(Float64(18.0 * t) * t_1)) - Float64(t_3 + Float64(x * Float64(4.0 * i)))); elseif (t_2 <= 2e-277) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0)))) - t_4); elseif ((t_2 <= 5e-35) || !(t_2 <= 200000000.0)) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + t_4)) - t_2); else tmp = Float64(Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))) + Float64(Float64(b * c) - t_3)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = x * (y * z); t_2 = (j * 27.0) * k; t_3 = j * (27.0 * k); t_4 = 4.0 * (x * i); tmp = 0.0; if (t_2 <= -2e+120) tmp = ((b * c) + ((18.0 * t) * t_1)) - (t_3 + (x * (4.0 * i))); elseif (t_2 <= 2e-277) tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_4; elseif ((t_2 <= 5e-35) || ~((t_2 <= 200000000.0))) tmp = ((b * c) - ((4.0 * (t * a)) + t_4)) - t_2; else tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - t_3); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+120], N[(N[(N[(b * c), $MachinePrecision] + N[(N[(18.0 * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e-277], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$4), $MachinePrecision], If[Or[LessEqual[t$95$2, 5e-35], N[Not[LessEqual[t$95$2, 200000000.0]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], N[(N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - t$95$3), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := j \cdot \left(27 \cdot k\right)\\
t_4 := 4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+120}:\\
\;\;\;\;\left(b \cdot c + \left(18 \cdot t\right) \cdot t_1\right) - \left(t_3 + x \cdot \left(4 \cdot i\right)\right)\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-277}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t_1 - a \cdot 4\right)\right) - t_4\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-35} \lor \neg \left(t_2 \leq 200000000\right):\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + t_4\right)\right) - t_2\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - t_3\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j 27) k) < -2e120Initial program 94.4%
Simplified97.3%
associate-*r*94.4%
distribute-rgt-out--94.4%
cancel-sign-sub-inv94.4%
associate-*l*94.2%
fma-def94.2%
associate-*l*94.2%
Applied egg-rr94.2%
Taylor expanded in x around inf 94.5%
associate-*r*94.5%
*-commutative94.5%
Simplified94.5%
if -2e120 < (*.f64 (*.f64 j 27) k) < 1.99999999999999994e-277Initial program 87.9%
Simplified90.4%
Taylor expanded in j around 0 86.6%
if 1.99999999999999994e-277 < (*.f64 (*.f64 j 27) k) < 4.99999999999999964e-35 or 2e8 < (*.f64 (*.f64 j 27) k) Initial program 84.9%
Taylor expanded in y around 0 90.1%
if 4.99999999999999964e-35 < (*.f64 (*.f64 j 27) k) < 2e8Initial program 92.2%
Taylor expanded in i around 0 99.9%
Taylor expanded in a around 0 99.9%
associate--l+99.9%
associate-*r*99.8%
*-commutative99.8%
*-commutative99.8%
associate-*l*100.0%
associate-*r*100.0%
Applied egg-rr100.0%
Final simplification89.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= (* j 27.0) -2e+45)
(not
(or (<= (* j 27.0) -5e-194)
(and (not (<= (* j 27.0) -5e-243)) (<= (* j 27.0) 1e-110)))))
(+ (* 18.0 (* y (* z (* x t)))) (- (* b c) (* j (* 27.0 k))))
(- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((j * 27.0) <= -2e+45) || !(((j * 27.0) <= -5e-194) || (!((j * 27.0) <= -5e-243) && ((j * 27.0) <= 1e-110)))) {
tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k)));
} else {
tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((j * 27.0d0) <= (-2d+45)) .or. (.not. ((j * 27.0d0) <= (-5d-194)) .or. (.not. ((j * 27.0d0) <= (-5d-243))) .and. ((j * 27.0d0) <= 1d-110))) then
tmp = (18.0d0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0d0 * k)))
else
tmp = (b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((j * 27.0) <= -2e+45) || !(((j * 27.0) <= -5e-194) || (!((j * 27.0) <= -5e-243) && ((j * 27.0) <= 1e-110)))) {
tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k)));
} else {
tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((j * 27.0) <= -2e+45) or not (((j * 27.0) <= -5e-194) or (not ((j * 27.0) <= -5e-243) and ((j * 27.0) <= 1e-110))): tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k))) else: tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(j * 27.0) <= -2e+45) || !((Float64(j * 27.0) <= -5e-194) || (!(Float64(j * 27.0) <= -5e-243) && (Float64(j * 27.0) <= 1e-110)))) tmp = Float64(Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))) + Float64(Float64(b * c) - Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * 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 (((j * 27.0) <= -2e+45) || ~((((j * 27.0) <= -5e-194) || (~(((j * 27.0) <= -5e-243)) && ((j * 27.0) <= 1e-110))))) tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k))); else tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(j * 27.0), $MachinePrecision], -2e+45], N[Not[Or[LessEqual[N[(j * 27.0), $MachinePrecision], -5e-194], And[N[Not[LessEqual[N[(j * 27.0), $MachinePrecision], -5e-243]], $MachinePrecision], LessEqual[N[(j * 27.0), $MachinePrecision], 1e-110]]]], $MachinePrecision]], N[(N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \cdot 27 \leq -2 \cdot 10^{+45} \lor \neg \left(j \cdot 27 \leq -5 \cdot 10^{-194} \lor \neg \left(j \cdot 27 \leq -5 \cdot 10^{-243}\right) \land j \cdot 27 \leq 10^{-110}\right):\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 j 27) < -1.9999999999999999e45 or -5.0000000000000002e-194 < (*.f64 j 27) < -5e-243 or 1.0000000000000001e-110 < (*.f64 j 27) Initial program 88.0%
Taylor expanded in i around 0 80.6%
Taylor expanded in a around 0 69.9%
associate--l+69.9%
associate-*r*68.4%
*-commutative68.4%
*-commutative68.4%
associate-*l*72.6%
associate-*r*72.6%
Applied egg-rr72.6%
if -1.9999999999999999e45 < (*.f64 j 27) < -5.0000000000000002e-194 or -5e-243 < (*.f64 j 27) < 1.0000000000000001e-110Initial program 87.9%
Taylor expanded in y around 0 78.6%
Taylor expanded in j around 0 71.2%
Final simplification72.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* 18.0 (* y (* z (* x t)))) (- (* b c) (* j (* 27.0 k)))))
(t_2 (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i))))))
(if (<= (* j 27.0) -2e+45)
t_1
(if (<= (* j 27.0) -5e-194)
t_2
(if (<= (* j 27.0) -5e-243)
(- (+ (* b c) (* 18.0 (* t (* x (* y z))))) (* (* j 27.0) k))
(if (<= (* j 27.0) 1e-110) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k)));
double t_2 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
double tmp;
if ((j * 27.0) <= -2e+45) {
tmp = t_1;
} else if ((j * 27.0) <= -5e-194) {
tmp = t_2;
} else if ((j * 27.0) <= -5e-243) {
tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - ((j * 27.0) * k);
} else if ((j * 27.0) <= 1e-110) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (18.0d0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0d0 * k)))
t_2 = (b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
if ((j * 27.0d0) <= (-2d+45)) then
tmp = t_1
else if ((j * 27.0d0) <= (-5d-194)) then
tmp = t_2
else if ((j * 27.0d0) <= (-5d-243)) then
tmp = ((b * c) + (18.0d0 * (t * (x * (y * z))))) - ((j * 27.0d0) * k)
else if ((j * 27.0d0) <= 1d-110) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k)));
double t_2 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
double tmp;
if ((j * 27.0) <= -2e+45) {
tmp = t_1;
} else if ((j * 27.0) <= -5e-194) {
tmp = t_2;
} else if ((j * 27.0) <= -5e-243) {
tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - ((j * 27.0) * k);
} else if ((j * 27.0) <= 1e-110) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k))) t_2 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))) tmp = 0 if (j * 27.0) <= -2e+45: tmp = t_1 elif (j * 27.0) <= -5e-194: tmp = t_2 elif (j * 27.0) <= -5e-243: tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - ((j * 27.0) * k) elif (j * 27.0) <= 1e-110: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))) + Float64(Float64(b * c) - Float64(j * Float64(27.0 * k)))) t_2 = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) tmp = 0.0 if (Float64(j * 27.0) <= -2e+45) tmp = t_1; elseif (Float64(j * 27.0) <= -5e-194) tmp = t_2; elseif (Float64(j * 27.0) <= -5e-243) tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))) - Float64(Float64(j * 27.0) * k)); elseif (Float64(j * 27.0) <= 1e-110) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k))); t_2 = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))); tmp = 0.0; if ((j * 27.0) <= -2e+45) tmp = t_1; elseif ((j * 27.0) <= -5e-194) tmp = t_2; elseif ((j * 27.0) <= -5e-243) tmp = ((b * c) + (18.0 * (t * (x * (y * z))))) - ((j * 27.0) * k); elseif ((j * 27.0) <= 1e-110) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(j * 27.0), $MachinePrecision], -2e+45], t$95$1, If[LessEqual[N[(j * 27.0), $MachinePrecision], -5e-194], t$95$2, If[LessEqual[N[(j * 27.0), $MachinePrecision], -5e-243], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(j * 27.0), $MachinePrecision], 1e-110], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\
t_2 := b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{if}\;j \cdot 27 \leq -2 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{-194}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \cdot 27 \leq -5 \cdot 10^{-243}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;j \cdot 27 \leq 10^{-110}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 j 27) < -1.9999999999999999e45 or 1.0000000000000001e-110 < (*.f64 j 27) Initial program 87.3%
Taylor expanded in i around 0 80.2%
Taylor expanded in a around 0 70.4%
associate--l+70.4%
associate-*r*68.8%
*-commutative68.8%
*-commutative68.8%
associate-*l*73.9%
associate-*r*73.9%
Applied egg-rr73.9%
if -1.9999999999999999e45 < (*.f64 j 27) < -5.0000000000000002e-194 or -5e-243 < (*.f64 j 27) < 1.0000000000000001e-110Initial program 87.9%
Taylor expanded in y around 0 78.6%
Taylor expanded in j around 0 71.2%
if -5.0000000000000002e-194 < (*.f64 j 27) < -5e-243Initial program 99.8%
Taylor expanded in i around 0 87.2%
Taylor expanded in a around 0 62.6%
Final simplification72.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a)))
(t_2 (+ (* b c) t_1))
(t_3 (* j (* k -27.0)))
(t_4 (+ t_3 (* -4.0 (* x i)))))
(if (<= (* b c) -3.4e+115)
t_2
(if (<= (* b c) -1.22e-76)
t_4
(if (<= (* b c) -3.85e-146)
(* 18.0 (* x (* z (* y t))))
(if (<= (* b c) 1.56e-286)
t_4
(if (<= (* b c) 1.15e+54)
(+ t_1 t_3)
(if (<= (* b c) 2.3e+86) (* 18.0 (* (* y z) (* x t))) 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 = -4.0 * (t * a);
double t_2 = (b * c) + t_1;
double t_3 = j * (k * -27.0);
double t_4 = t_3 + (-4.0 * (x * i));
double tmp;
if ((b * c) <= -3.4e+115) {
tmp = t_2;
} else if ((b * c) <= -1.22e-76) {
tmp = t_4;
} else if ((b * c) <= -3.85e-146) {
tmp = 18.0 * (x * (z * (y * t)));
} else if ((b * c) <= 1.56e-286) {
tmp = t_4;
} else if ((b * c) <= 1.15e+54) {
tmp = t_1 + t_3;
} else if ((b * c) <= 2.3e+86) {
tmp = 18.0 * ((y * z) * (x * t));
} 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) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (-4.0d0) * (t * a)
t_2 = (b * c) + t_1
t_3 = j * (k * (-27.0d0))
t_4 = t_3 + ((-4.0d0) * (x * i))
if ((b * c) <= (-3.4d+115)) then
tmp = t_2
else if ((b * c) <= (-1.22d-76)) then
tmp = t_4
else if ((b * c) <= (-3.85d-146)) then
tmp = 18.0d0 * (x * (z * (y * t)))
else if ((b * c) <= 1.56d-286) then
tmp = t_4
else if ((b * c) <= 1.15d+54) then
tmp = t_1 + t_3
else if ((b * c) <= 2.3d+86) then
tmp = 18.0d0 * ((y * z) * (x * t))
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 = -4.0 * (t * a);
double t_2 = (b * c) + t_1;
double t_3 = j * (k * -27.0);
double t_4 = t_3 + (-4.0 * (x * i));
double tmp;
if ((b * c) <= -3.4e+115) {
tmp = t_2;
} else if ((b * c) <= -1.22e-76) {
tmp = t_4;
} else if ((b * c) <= -3.85e-146) {
tmp = 18.0 * (x * (z * (y * t)));
} else if ((b * c) <= 1.56e-286) {
tmp = t_4;
} else if ((b * c) <= 1.15e+54) {
tmp = t_1 + t_3;
} else if ((b * c) <= 2.3e+86) {
tmp = 18.0 * ((y * z) * (x * t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (t * a) t_2 = (b * c) + t_1 t_3 = j * (k * -27.0) t_4 = t_3 + (-4.0 * (x * i)) tmp = 0 if (b * c) <= -3.4e+115: tmp = t_2 elif (b * c) <= -1.22e-76: tmp = t_4 elif (b * c) <= -3.85e-146: tmp = 18.0 * (x * (z * (y * t))) elif (b * c) <= 1.56e-286: tmp = t_4 elif (b * c) <= 1.15e+54: tmp = t_1 + t_3 elif (b * c) <= 2.3e+86: tmp = 18.0 * ((y * z) * (x * t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) t_2 = Float64(Float64(b * c) + t_1) t_3 = Float64(j * Float64(k * -27.0)) t_4 = Float64(t_3 + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -3.4e+115) tmp = t_2; elseif (Float64(b * c) <= -1.22e-76) tmp = t_4; elseif (Float64(b * c) <= -3.85e-146) tmp = Float64(18.0 * Float64(x * Float64(z * Float64(y * t)))); elseif (Float64(b * c) <= 1.56e-286) tmp = t_4; elseif (Float64(b * c) <= 1.15e+54) tmp = Float64(t_1 + t_3); elseif (Float64(b * c) <= 2.3e+86) tmp = Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -4.0 * (t * a); t_2 = (b * c) + t_1; t_3 = j * (k * -27.0); t_4 = t_3 + (-4.0 * (x * i)); tmp = 0.0; if ((b * c) <= -3.4e+115) tmp = t_2; elseif ((b * c) <= -1.22e-76) tmp = t_4; elseif ((b * c) <= -3.85e-146) tmp = 18.0 * (x * (z * (y * t))); elseif ((b * c) <= 1.56e-286) tmp = t_4; elseif ((b * c) <= 1.15e+54) tmp = t_1 + t_3; elseif ((b * c) <= 2.3e+86) tmp = 18.0 * ((y * z) * (x * t)); 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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.4e+115], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -1.22e-76], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], -3.85e-146], N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.56e-286], t$95$4, If[LessEqual[N[(b * c), $MachinePrecision], 1.15e+54], N[(t$95$1 + t$95$3), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+86], N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
t_2 := b \cdot c + t_1\\
t_3 := j \cdot \left(k \cdot -27\right)\\
t_4 := t_3 + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -3.4 \cdot 10^{+115}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -1.22 \cdot 10^{-76}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \cdot c \leq -3.85 \cdot 10^{-146}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 1.56 \cdot 10^{-286}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+54}:\\
\;\;\;\;t_1 + t_3\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+86}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (*.f64 b c) < -3.4000000000000001e115 or 2.2999999999999999e86 < (*.f64 b c) Initial program 84.9%
Simplified86.0%
Taylor expanded in x around 0 80.1%
Taylor expanded in j around 0 74.8%
if -3.4000000000000001e115 < (*.f64 b c) < -1.22e-76 or -3.84999999999999998e-146 < (*.f64 b c) < 1.56e-286Initial program 87.9%
Simplified89.0%
Taylor expanded in i around inf 61.6%
*-commutative61.6%
Simplified61.6%
if -1.22e-76 < (*.f64 b c) < -3.84999999999999998e-146Initial program 88.5%
Simplified88.5%
associate--l+88.5%
*-commutative88.5%
fma-neg88.5%
fma-def88.5%
*-commutative88.5%
*-commutative88.5%
Applied egg-rr88.5%
Taylor expanded in y around inf 76.3%
associate-*r*87.4%
*-commutative87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in y around 0 76.3%
*-commutative76.3%
associate-*l*87.6%
*-commutative87.6%
associate-*r*87.4%
*-commutative87.4%
Simplified87.4%
if 1.56e-286 < (*.f64 b c) < 1.14999999999999997e54Initial program 94.0%
Simplified88.3%
Taylor expanded in a around inf 58.1%
if 1.14999999999999997e54 < (*.f64 b c) < 2.2999999999999999e86Initial program 83.3%
Simplified83.3%
associate--l+83.3%
*-commutative83.3%
fma-neg83.3%
fma-def83.3%
*-commutative83.3%
*-commutative83.3%
Applied egg-rr83.3%
Taylor expanded in y around inf 83.4%
associate-*r*83.9%
*-commutative83.9%
*-commutative83.9%
Simplified83.9%
Final simplification67.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -5e-101) (not (<= t 7.5e-289)))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* j (* 27.0 k)) (* x (* 4.0 i))))
(- (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x 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 ((t <= -5e-101) || !(t <= 7.5e-289)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
} else {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * 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 ((t <= (-5d-101)) .or. (.not. (t <= 7.5d-289))) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((j * (27.0d0 * k)) + (x * (4.0d0 * i)))
else
tmp = ((b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * 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 ((t <= -5e-101) || !(t <= 7.5e-289)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i)));
} else {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -5e-101) or not (t <= 7.5e-289): tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i))) else: tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -5e-101) || !(t <= 7.5e-289)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(j * Float64(27.0 * k)) + Float64(x * Float64(4.0 * i)))); else tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) - 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 ((t <= -5e-101) || ~((t <= 7.5e-289))) tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((j * (27.0 * k)) + (x * (4.0 * i))); else tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -5e-101], N[Not[LessEqual[t, 7.5e-289]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision] + N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-101} \lor \neg \left(t \leq 7.5 \cdot 10^{-289}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(j \cdot \left(27 \cdot k\right) + x \cdot \left(4 \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -5.0000000000000001e-101 or 7.49999999999999998e-289 < t Initial program 88.0%
Simplified90.9%
if -5.0000000000000001e-101 < t < 7.49999999999999998e-289Initial program 87.7%
Taylor expanded in y around 0 94.8%
Final simplification91.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* i -4.0))))
(if (<= (* b c) -6.2e+114)
(* b c)
(if (<= (* b c) -2e-30)
t_1
(if (<= (* b c) -2.25e-66)
(* k (* j -27.0))
(if (<= (* b c) 3.4e-196)
t_1
(if (<= (* b c) 9.5e+18)
(* (* j k) -27.0)
(if (<= (* b c) 2.85e+156) (* t (* a -4.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 t_1 = x * (i * -4.0);
double tmp;
if ((b * c) <= -6.2e+114) {
tmp = b * c;
} else if ((b * c) <= -2e-30) {
tmp = t_1;
} else if ((b * c) <= -2.25e-66) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 3.4e-196) {
tmp = t_1;
} else if ((b * c) <= 9.5e+18) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 2.85e+156) {
tmp = t * (a * -4.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) :: t_1
real(8) :: tmp
t_1 = x * (i * (-4.0d0))
if ((b * c) <= (-6.2d+114)) then
tmp = b * c
else if ((b * c) <= (-2d-30)) then
tmp = t_1
else if ((b * c) <= (-2.25d-66)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 3.4d-196) then
tmp = t_1
else if ((b * c) <= 9.5d+18) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 2.85d+156) then
tmp = t * (a * (-4.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 t_1 = x * (i * -4.0);
double tmp;
if ((b * c) <= -6.2e+114) {
tmp = b * c;
} else if ((b * c) <= -2e-30) {
tmp = t_1;
} else if ((b * c) <= -2.25e-66) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 3.4e-196) {
tmp = t_1;
} else if ((b * c) <= 9.5e+18) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 2.85e+156) {
tmp = t * (a * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (i * -4.0) tmp = 0 if (b * c) <= -6.2e+114: tmp = b * c elif (b * c) <= -2e-30: tmp = t_1 elif (b * c) <= -2.25e-66: tmp = k * (j * -27.0) elif (b * c) <= 3.4e-196: tmp = t_1 elif (b * c) <= 9.5e+18: tmp = (j * k) * -27.0 elif (b * c) <= 2.85e+156: tmp = t * (a * -4.0) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (Float64(b * c) <= -6.2e+114) tmp = Float64(b * c); elseif (Float64(b * c) <= -2e-30) tmp = t_1; elseif (Float64(b * c) <= -2.25e-66) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 3.4e-196) tmp = t_1; elseif (Float64(b * c) <= 9.5e+18) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 2.85e+156) tmp = Float64(t * Float64(a * -4.0)); 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 = x * (i * -4.0); tmp = 0.0; if ((b * c) <= -6.2e+114) tmp = b * c; elseif ((b * c) <= -2e-30) tmp = t_1; elseif ((b * c) <= -2.25e-66) tmp = k * (j * -27.0); elseif ((b * c) <= 3.4e-196) tmp = t_1; elseif ((b * c) <= 9.5e+18) tmp = (j * k) * -27.0; elseif ((b * c) <= 2.85e+156) tmp = t * (a * -4.0); 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[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.2e+114], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2e-30], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2.25e-66], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.4e-196], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 9.5e+18], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.85e+156], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -6.2 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -2.25 \cdot 10^{-66}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{-196}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 9.5 \cdot 10^{+18}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 2.85 \cdot 10^{+156}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.2000000000000001e114 or 2.84999999999999999e156 < (*.f64 b c) Initial program 84.1%
Simplified86.5%
associate--l+86.5%
*-commutative86.5%
fma-neg86.5%
fma-def86.5%
*-commutative86.5%
*-commutative86.5%
Applied egg-rr86.5%
Taylor expanded in b around inf 66.2%
if -6.2000000000000001e114 < (*.f64 b c) < -2e-30 or -2.2499999999999999e-66 < (*.f64 b c) < 3.4e-196Initial program 88.5%
Simplified89.4%
associate--l+89.4%
*-commutative89.4%
fma-neg89.4%
fma-def89.5%
*-commutative89.5%
*-commutative89.5%
Applied egg-rr89.5%
Taylor expanded in i around inf 35.5%
associate-*r*35.5%
Simplified35.5%
if -2e-30 < (*.f64 b c) < -2.2499999999999999e-66Initial program 84.1%
Simplified84.4%
associate-*r*92.4%
distribute-rgt-out--84.1%
cancel-sign-sub-inv84.1%
associate-*l*91.7%
fma-def91.7%
associate-*l*91.7%
Applied egg-rr91.7%
Taylor expanded in a around 0 76.0%
associate--r+76.0%
Simplified92.0%
Taylor expanded in j around inf 59.4%
*-commutative59.4%
*-commutative59.4%
associate-*r*59.5%
Simplified59.5%
if 3.4e-196 < (*.f64 b c) < 9.5e18Initial program 94.4%
Simplified86.6%
Taylor expanded in j around inf 37.7%
if 9.5e18 < (*.f64 b c) < 2.84999999999999999e156Initial program 90.8%
Simplified86.3%
associate--l+86.3%
*-commutative86.3%
fma-neg86.3%
fma-def86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in a around inf 38.3%
metadata-eval38.3%
distribute-lft-neg-in38.3%
associate-*r*38.3%
*-commutative38.3%
*-commutative38.3%
distribute-rgt-neg-in38.3%
*-rgt-identity38.3%
*-rgt-identity38.3%
*-commutative38.3%
distribute-lft-neg-in38.3%
metadata-eval38.3%
Simplified38.3%
Final simplification47.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= j -1.15e+209)
(- (* t (* (* 18.0 y) (* x z))) (* j (* 27.0 k)))
(if (or (<= j -4.8e+191)
(and (not (<= j -2.1e+147))
(or (<= j -2.2e+123)
(and (not (<= j -9e+53)) (<= j 4.6e-55)))))
(- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i))))
(+ (* 18.0 (* x (* y (* z t)))) (* j (* k -27.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.15e+209) {
tmp = (t * ((18.0 * y) * (x * z))) - (j * (27.0 * k));
} else if ((j <= -4.8e+191) || (!(j <= -2.1e+147) && ((j <= -2.2e+123) || (!(j <= -9e+53) && (j <= 4.6e-55))))) {
tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
} else {
tmp = (18.0 * (x * (y * (z * t)))) + (j * (k * -27.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (j <= (-1.15d+209)) then
tmp = (t * ((18.0d0 * y) * (x * z))) - (j * (27.0d0 * k))
else if ((j <= (-4.8d+191)) .or. (.not. (j <= (-2.1d+147))) .and. (j <= (-2.2d+123)) .or. (.not. (j <= (-9d+53))) .and. (j <= 4.6d-55)) then
tmp = (b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
else
tmp = (18.0d0 * (x * (y * (z * t)))) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (j <= -1.15e+209) {
tmp = (t * ((18.0 * y) * (x * z))) - (j * (27.0 * k));
} else if ((j <= -4.8e+191) || (!(j <= -2.1e+147) && ((j <= -2.2e+123) || (!(j <= -9e+53) && (j <= 4.6e-55))))) {
tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
} else {
tmp = (18.0 * (x * (y * (z * t)))) + (j * (k * -27.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if j <= -1.15e+209: tmp = (t * ((18.0 * y) * (x * z))) - (j * (27.0 * k)) elif (j <= -4.8e+191) or (not (j <= -2.1e+147) and ((j <= -2.2e+123) or (not (j <= -9e+53) and (j <= 4.6e-55)))): tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))) else: tmp = (18.0 * (x * (y * (z * t)))) + (j * (k * -27.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (j <= -1.15e+209) tmp = Float64(Float64(t * Float64(Float64(18.0 * y) * Float64(x * z))) - Float64(j * Float64(27.0 * k))); elseif ((j <= -4.8e+191) || (!(j <= -2.1e+147) && ((j <= -2.2e+123) || (!(j <= -9e+53) && (j <= 4.6e-55))))) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))); else tmp = Float64(Float64(18.0 * Float64(x * Float64(y * Float64(z * t)))) + Float64(j * Float64(k * -27.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (j <= -1.15e+209) tmp = (t * ((18.0 * y) * (x * z))) - (j * (27.0 * k)); elseif ((j <= -4.8e+191) || (~((j <= -2.1e+147)) && ((j <= -2.2e+123) || (~((j <= -9e+53)) && (j <= 4.6e-55))))) tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))); else tmp = (18.0 * (x * (y * (z * t)))) + (j * (k * -27.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[j, -1.15e+209], N[(N[(t * N[(N[(18.0 * y), $MachinePrecision] * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[j, -4.8e+191], And[N[Not[LessEqual[j, -2.1e+147]], $MachinePrecision], Or[LessEqual[j, -2.2e+123], And[N[Not[LessEqual[j, -9e+53]], $MachinePrecision], LessEqual[j, 4.6e-55]]]]], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.15 \cdot 10^{+209}:\\
\;\;\;\;t \cdot \left(\left(18 \cdot y\right) \cdot \left(x \cdot z\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{elif}\;j \leq -4.8 \cdot 10^{+191} \lor \neg \left(j \leq -2.1 \cdot 10^{+147}\right) \land \left(j \leq -2.2 \cdot 10^{+123} \lor \neg \left(j \leq -9 \cdot 10^{+53}\right) \land j \leq 4.6 \cdot 10^{-55}\right):\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if j < -1.15000000000000005e209Initial program 83.2%
Simplified88.8%
associate-*r*83.2%
distribute-rgt-out--83.2%
cancel-sign-sub-inv83.2%
associate-*l*66.6%
fma-def66.6%
associate-*l*66.6%
Applied egg-rr66.6%
Taylor expanded in a around 0 83.4%
associate--r+83.4%
Simplified89.0%
Taylor expanded in z around inf 75.0%
*-commutative75.0%
associate-*l*75.0%
associate-*r*75.0%
*-commutative75.0%
associate-*r*75.0%
*-commutative75.0%
*-commutative75.0%
associate-*l*69.7%
Simplified69.7%
if -1.15000000000000005e209 < j < -4.79999999999999972e191 or -2.10000000000000006e147 < j < -2.19999999999999992e123 or -9.0000000000000004e53 < j < 4.60000000000000023e-55Initial program 89.8%
Taylor expanded in y around 0 78.0%
Taylor expanded in j around 0 69.6%
if -4.79999999999999972e191 < j < -2.10000000000000006e147 or -2.19999999999999992e123 < j < -9.0000000000000004e53 or 4.60000000000000023e-55 < j Initial program 85.8%
Simplified87.1%
Taylor expanded in y around inf 50.6%
*-commutative50.6%
associate-*l*51.7%
associate-*l*55.4%
Simplified55.4%
Final simplification64.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= j -1.35e+209)
(+ (* 18.0 (* t (* x (* y z)))) t_1)
(if (or (<= j -1.15e+123) (and (not (<= j -6.5e+52)) (<= j 1.02e-55)))
(- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i))))
(+ (* 18.0 (* x (* y (* z t)))) 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 * (k * -27.0);
double tmp;
if (j <= -1.35e+209) {
tmp = (18.0 * (t * (x * (y * z)))) + t_1;
} else if ((j <= -1.15e+123) || (!(j <= -6.5e+52) && (j <= 1.02e-55))) {
tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
} else {
tmp = (18.0 * (x * (y * (z * t)))) + 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 * (k * (-27.0d0))
if (j <= (-1.35d+209)) then
tmp = (18.0d0 * (t * (x * (y * z)))) + t_1
else if ((j <= (-1.15d+123)) .or. (.not. (j <= (-6.5d+52))) .and. (j <= 1.02d-55)) then
tmp = (b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
else
tmp = (18.0d0 * (x * (y * (z * t)))) + 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 * (k * -27.0);
double tmp;
if (j <= -1.35e+209) {
tmp = (18.0 * (t * (x * (y * z)))) + t_1;
} else if ((j <= -1.15e+123) || (!(j <= -6.5e+52) && (j <= 1.02e-55))) {
tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
} else {
tmp = (18.0 * (x * (y * (z * t)))) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if j <= -1.35e+209: tmp = (18.0 * (t * (x * (y * z)))) + t_1 elif (j <= -1.15e+123) or (not (j <= -6.5e+52) and (j <= 1.02e-55)): tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))) else: tmp = (18.0 * (x * (y * (z * t)))) + t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (j <= -1.35e+209) tmp = Float64(Float64(18.0 * Float64(t * Float64(x * Float64(y * z)))) + t_1); elseif ((j <= -1.15e+123) || (!(j <= -6.5e+52) && (j <= 1.02e-55))) tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))); else tmp = Float64(Float64(18.0 * Float64(x * Float64(y * Float64(z * t)))) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = j * (k * -27.0); tmp = 0.0; if (j <= -1.35e+209) tmp = (18.0 * (t * (x * (y * z)))) + t_1; elseif ((j <= -1.15e+123) || (~((j <= -6.5e+52)) && (j <= 1.02e-55))) tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))); else tmp = (18.0 * (x * (y * (z * t)))) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.35e+209], N[(N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[Or[LessEqual[j, -1.15e+123], And[N[Not[LessEqual[j, -6.5e+52]], $MachinePrecision], LessEqual[j, 1.02e-55]]], N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * N[(x * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;j \leq -1.35 \cdot 10^{+209}:\\
\;\;\;\;18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right) + t_1\\
\mathbf{elif}\;j \leq -1.15 \cdot 10^{+123} \lor \neg \left(j \leq -6.5 \cdot 10^{+52}\right) \land j \leq 1.02 \cdot 10^{-55}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(y \cdot \left(z \cdot t\right)\right)\right) + t_1\\
\end{array}
\end{array}
if j < -1.35e209Initial program 83.2%
Simplified88.8%
Taylor expanded in y around inf 75.0%
*-commutative75.0%
Simplified75.0%
if -1.35e209 < j < -1.14999999999999995e123 or -6.49999999999999996e52 < j < 1.02e-55Initial program 88.6%
Taylor expanded in y around 0 76.5%
Taylor expanded in j around 0 67.4%
if -1.14999999999999995e123 < j < -6.49999999999999996e52 or 1.02e-55 < j Initial program 87.6%
Simplified86.6%
Taylor expanded in y around inf 49.5%
*-commutative49.5%
associate-*l*50.8%
associate-*l*54.2%
Simplified54.2%
Final simplification63.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))))
(if (<= j -7.2e+66)
t_1
(if (<= j -3e+51)
(* x (+ (* i -4.0) (* 18.0 (* z (* y t)))))
(if (or (<= j -2.15e+38) (not (<= j 3.6e-151)))
t_1
(- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
double tmp;
if (j <= -7.2e+66) {
tmp = t_1;
} else if (j <= -3e+51) {
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
} else if ((j <= -2.15e+38) || !(j <= 3.6e-151)) {
tmp = t_1;
} else {
tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
if (j <= (-7.2d+66)) then
tmp = t_1
else if (j <= (-3d+51)) then
tmp = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
else if ((j <= (-2.15d+38)) .or. (.not. (j <= 3.6d-151))) then
tmp = t_1
else
tmp = (b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
double tmp;
if (j <= -7.2e+66) {
tmp = t_1;
} else if (j <= -3e+51) {
tmp = x * ((i * -4.0) + (18.0 * (z * (y * t))));
} else if ((j <= -2.15e+38) || !(j <= 3.6e-151)) {
tmp = t_1;
} else {
tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) tmp = 0 if j <= -7.2e+66: tmp = t_1 elif j <= -3e+51: tmp = x * ((i * -4.0) + (18.0 * (z * (y * t)))) elif (j <= -2.15e+38) or not (j <= 3.6e-151): tmp = t_1 else: tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))) 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(27.0 * Float64(j * k))) tmp = 0.0 if (j <= -7.2e+66) tmp = t_1; elseif (j <= -3e+51) tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))); elseif ((j <= -2.15e+38) || !(j <= 3.6e-151)) tmp = t_1; else tmp = Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)); tmp = 0.0; if (j <= -7.2e+66) tmp = t_1; elseif (j <= -3e+51) tmp = x * ((i * -4.0) + (18.0 * (z * (y * t)))); elseif ((j <= -2.15e+38) || ~((j <= 3.6e-151))) tmp = t_1; else tmp = (b * c) - ((4.0 * (t * a)) + (4.0 * (x * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -7.2e+66], t$95$1, If[LessEqual[j, -3e+51], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[j, -2.15e+38], N[Not[LessEqual[j, 3.6e-151]], $MachinePrecision]], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{if}\;j \leq -7.2 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -3 \cdot 10^{+51}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;j \leq -2.15 \cdot 10^{+38} \lor \neg \left(j \leq 3.6 \cdot 10^{-151}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if j < -7.2e66 or -3e51 < j < -2.1499999999999998e38 or 3.60000000000000032e-151 < j Initial program 88.8%
Simplified88.3%
Taylor expanded in x around 0 70.2%
if -7.2e66 < j < -3e51Initial program 75.0%
Simplified75.0%
associate--l+75.0%
*-commutative75.0%
fma-neg75.0%
fma-def75.0%
*-commutative75.0%
*-commutative75.0%
Applied egg-rr75.0%
Taylor expanded in x around inf 100.0%
cancel-sign-sub-inv100.0%
metadata-eval100.0%
associate-*r*100.0%
Simplified100.0%
if -2.1499999999999998e38 < j < 3.60000000000000032e-151Initial program 87.2%
Taylor expanded in y around 0 76.5%
Taylor expanded in j around 0 70.5%
Final simplification70.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))))
(if (<= t -6.5e+119)
t_1
(if (<= t 2.8e+38)
(- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))
(if (<= t 4.4e+118)
(* x (+ (* i -4.0) (* t (* y (* 18.0 z)))))
(if (<= t 3.6e+155)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j 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 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -6.5e+119) {
tmp = t_1;
} else if (t <= 2.8e+38) {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
} else if (t <= 4.4e+118) {
tmp = x * ((i * -4.0) + (t * (y * (18.0 * z))));
} else if (t <= 3.6e+155) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * 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 = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
if (t <= (-6.5d+119)) then
tmp = t_1
else if (t <= 2.8d+38) then
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
else if (t <= 4.4d+118) then
tmp = x * ((i * (-4.0d0)) + (t * (y * (18.0d0 * z))))
else if (t <= 3.6d+155) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * 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 = t * (((x * 18.0) * (y * z)) + (a * -4.0));
double tmp;
if (t <= -6.5e+119) {
tmp = t_1;
} else if (t <= 2.8e+38) {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
} else if (t <= 4.4e+118) {
tmp = x * ((i * -4.0) + (t * (y * (18.0 * z))));
} else if (t <= 3.6e+155) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (((x * 18.0) * (y * z)) + (a * -4.0)) tmp = 0 if t <= -6.5e+119: tmp = t_1 elif t <= 2.8e+38: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) elif t <= 4.4e+118: tmp = x * ((i * -4.0) + (t * (y * (18.0 * z)))) elif t <= 3.6e+155: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))) tmp = 0.0 if (t <= -6.5e+119) tmp = t_1; elseif (t <= 2.8e+38) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); elseif (t <= 4.4e+118) tmp = Float64(x * Float64(Float64(i * -4.0) + Float64(t * Float64(y * Float64(18.0 * z))))); elseif (t <= 3.6e+155) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (((x * 18.0) * (y * z)) + (a * -4.0)); tmp = 0.0; if (t <= -6.5e+119) tmp = t_1; elseif (t <= 2.8e+38) tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k); elseif (t <= 4.4e+118) tmp = x * ((i * -4.0) + (t * (y * (18.0 * z)))); elseif (t <= 3.6e+155) tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * 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[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+119], t$95$1, If[LessEqual[t, 2.8e+38], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+118], N[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(t * N[(y * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+155], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+38}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \left(i \cdot -4 + t \cdot \left(y \cdot \left(18 \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+155}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -6.4999999999999997e119 or 3.60000000000000007e155 < t Initial program 87.6%
Simplified93.7%
Taylor expanded in t around inf 76.4%
sub-neg76.4%
associate-*r*76.4%
*-commutative76.4%
*-commutative76.4%
distribute-rgt-neg-in76.4%
metadata-eval76.4%
Applied egg-rr76.4%
if -6.4999999999999997e119 < t < 2.8e38Initial program 89.0%
Taylor expanded in t around 0 74.8%
if 2.8e38 < t < 4.39999999999999972e118Initial program 84.6%
Simplified92.2%
associate--l+92.2%
*-commutative92.2%
fma-neg92.2%
fma-def92.2%
*-commutative92.2%
*-commutative92.2%
Applied egg-rr92.2%
Taylor expanded in x around inf 91.3%
cancel-sign-sub-inv91.3%
metadata-eval91.3%
associate-*r*91.3%
Simplified91.3%
Taylor expanded in t around 0 91.3%
associate-*r*91.3%
*-commutative91.3%
*-commutative91.3%
*-commutative91.3%
associate-*r*91.3%
associate-*l*91.3%
associate-*l*91.3%
Simplified91.3%
if 4.39999999999999972e118 < t < 3.60000000000000007e155Initial program 71.4%
Simplified85.7%
Taylor expanded in x around 0 86.2%
Final simplification76.3%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= z 3.2e+161) (- (- (* b c) (+ (* 4.0 (* t a)) (* 4.0 (* x i)))) (* (* j 27.0) k)) (+ (* 18.0 (* y (* z (* x t)))) (- (* b c) (* 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 (z <= 3.2e+161) {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
} else {
tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (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 (z <= 3.2d+161) then
tmp = ((b * c) - ((4.0d0 * (t * a)) + (4.0d0 * (x * i)))) - ((j * 27.0d0) * k)
else
tmp = (18.0d0 * (y * (z * (x * t)))) + ((b * c) - (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 (z <= 3.2e+161) {
tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k);
} else {
tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 3.2e+161: tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k) else: tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 3.2e+161) tmp = Float64(Float64(Float64(b * c) - Float64(Float64(4.0 * Float64(t * a)) + Float64(4.0 * Float64(x * i)))) - Float64(Float64(j * 27.0) * k)); else tmp = Float64(Float64(18.0 * Float64(y * Float64(z * Float64(x * t)))) + Float64(Float64(b * c) - 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 (z <= 3.2e+161) tmp = ((b * c) - ((4.0 * (t * a)) + (4.0 * (x * i)))) - ((j * 27.0) * k); else tmp = (18.0 * (y * (z * (x * t)))) + ((b * c) - (j * (27.0 * k))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 3.2e+161], N[(N[(N[(b * c), $MachinePrecision] - N[(N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * N[(y * N[(z * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 3.2 \cdot 10^{+161}:\\
\;\;\;\;\left(b \cdot c - \left(4 \cdot \left(t \cdot a\right) + 4 \cdot \left(x \cdot i\right)\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(z \cdot \left(x \cdot t\right)\right)\right) + \left(b \cdot c - j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if z < 3.20000000000000002e161Initial program 89.0%
Taylor expanded in y around 0 81.7%
if 3.20000000000000002e161 < z Initial program 81.3%
Taylor expanded in i around 0 74.3%
Taylor expanded in a around 0 67.0%
associate--l+67.0%
associate-*r*63.9%
*-commutative63.9%
*-commutative63.9%
associate-*l*71.6%
associate-*r*71.7%
Applied egg-rr71.7%
Final simplification80.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (+ (* i -4.0) (* 18.0 (* z (* y t)))))))
(if (<= x -5.6e+35)
t_1
(if (<= x -1.82e-287)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 1.4e-49) (+ (* b c) (* -4.0 (* t a))) 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 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -5.6e+35) {
tmp = t_1;
} else if (x <= -1.82e-287) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 1.4e-49) {
tmp = (b * c) + (-4.0 * (t * a));
} 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 = x * ((i * (-4.0d0)) + (18.0d0 * (z * (y * t))))
if (x <= (-5.6d+35)) then
tmp = t_1
else if (x <= (-1.82d-287)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 1.4d-49) then
tmp = (b * c) + ((-4.0d0) * (t * a))
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 = x * ((i * -4.0) + (18.0 * (z * (y * t))));
double tmp;
if (x <= -5.6e+35) {
tmp = t_1;
} else if (x <= -1.82e-287) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 1.4e-49) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t)))) tmp = 0 if x <= -5.6e+35: tmp = t_1 elif x <= -1.82e-287: tmp = (b * c) - (27.0 * (j * k)) elif x <= 1.4e-49: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(i * -4.0) + Float64(18.0 * Float64(z * Float64(y * t))))) tmp = 0.0 if (x <= -5.6e+35) tmp = t_1; elseif (x <= -1.82e-287) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 1.4e-49) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = x * ((i * -4.0) + (18.0 * (z * (y * t)))); tmp = 0.0; if (x <= -5.6e+35) tmp = t_1; elseif (x <= -1.82e-287) tmp = (b * c) - (27.0 * (j * k)); elseif (x <= 1.4e-49) tmp = (b * c) + (-4.0 * (t * a)); 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[(x * N[(N[(i * -4.0), $MachinePrecision] + N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+35], t$95$1, If[LessEqual[x, -1.82e-287], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.4e-49], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(i \cdot -4 + 18 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.82 \cdot 10^{-287}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-49}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -5.59999999999999997e35 or 1.39999999999999999e-49 < x Initial program 79.7%
Simplified82.1%
associate--l+82.1%
*-commutative82.1%
fma-neg82.1%
fma-def82.1%
*-commutative82.1%
*-commutative82.1%
Applied egg-rr82.1%
Taylor expanded in x around inf 61.6%
cancel-sign-sub-inv61.6%
metadata-eval61.6%
associate-*r*64.7%
Simplified64.7%
if -5.59999999999999997e35 < x < -1.82000000000000004e-287Initial program 97.1%
Taylor expanded in i around 0 80.7%
Taylor expanded in a around 0 76.2%
Taylor expanded in t around 0 68.1%
if -1.82000000000000004e-287 < x < 1.39999999999999999e-49Initial program 95.0%
Simplified93.4%
Taylor expanded in x around 0 81.9%
Taylor expanded in j around 0 63.5%
Final simplification65.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -5.5e+111)
(* b c)
(if (<= (* b c) 2.4e+24)
(* k (* j -27.0))
(if (<= (* b c) 2.7e+158) (* t (* a -4.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 ((b * c) <= -5.5e+111) {
tmp = b * c;
} else if ((b * c) <= 2.4e+24) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 2.7e+158) {
tmp = t * (a * -4.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 ((b * c) <= (-5.5d+111)) then
tmp = b * c
else if ((b * c) <= 2.4d+24) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 2.7d+158) then
tmp = t * (a * (-4.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 ((b * c) <= -5.5e+111) {
tmp = b * c;
} else if ((b * c) <= 2.4e+24) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 2.7e+158) {
tmp = t * (a * -4.0);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5.5e+111: tmp = b * c elif (b * c) <= 2.4e+24: tmp = k * (j * -27.0) elif (b * c) <= 2.7e+158: tmp = t * (a * -4.0) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5.5e+111) tmp = Float64(b * c); elseif (Float64(b * c) <= 2.4e+24) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 2.7e+158) tmp = Float64(t * Float64(a * -4.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 ((b * c) <= -5.5e+111) tmp = b * c; elseif ((b * c) <= 2.4e+24) tmp = k * (j * -27.0); elseif ((b * c) <= 2.7e+158) tmp = t * (a * -4.0); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5.5e+111], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.4e+24], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.7e+158], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5.5 \cdot 10^{+111}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+24}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+158}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.4999999999999998e111 or 2.69999999999999979e158 < (*.f64 b c) Initial program 84.3%
Simplified86.7%
associate--l+86.7%
*-commutative86.7%
fma-neg86.7%
fma-def86.7%
*-commutative86.7%
*-commutative86.7%
Applied egg-rr86.7%
Taylor expanded in b around inf 65.5%
if -5.4999999999999998e111 < (*.f64 b c) < 2.4000000000000001e24Initial program 89.5%
Simplified88.2%
associate-*r*91.5%
distribute-rgt-out--89.5%
cancel-sign-sub-inv89.5%
associate-*l*87.9%
fma-def87.9%
associate-*l*87.9%
Applied egg-rr87.9%
Taylor expanded in a around 0 71.9%
associate--r+71.9%
Simplified79.1%
Taylor expanded in j around inf 30.0%
*-commutative30.0%
*-commutative30.0%
associate-*r*30.0%
Simplified30.0%
if 2.4000000000000001e24 < (*.f64 b c) < 2.69999999999999979e158Initial program 90.8%
Simplified86.3%
associate--l+86.3%
*-commutative86.3%
fma-neg86.3%
fma-def86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in a around inf 38.3%
metadata-eval38.3%
distribute-lft-neg-in38.3%
associate-*r*38.3%
*-commutative38.3%
*-commutative38.3%
distribute-rgt-neg-in38.3%
*-rgt-identity38.3%
*-rgt-identity38.3%
*-commutative38.3%
distribute-lft-neg-in38.3%
metadata-eval38.3%
Simplified38.3%
Final simplification42.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -2.5e+16)
(* t (+ (* (* x 18.0) (* y z)) (* a -4.0)))
(if (<= x -3.05e-288)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 2e-36)
(+ (* b c) (* -4.0 (* t a)))
(+ (* j (* k -27.0)) (* -4.0 (* x i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.5e+16) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else if (x <= -3.05e-288) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2e-36) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-2.5d+16)) then
tmp = t * (((x * 18.0d0) * (y * z)) + (a * (-4.0d0)))
else if (x <= (-3.05d-288)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 2d-36) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -2.5e+16) {
tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0));
} else if (x <= -3.05e-288) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 2e-36) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -2.5e+16: tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0)) elif x <= -3.05e-288: tmp = (b * c) - (27.0 * (j * k)) elif x <= 2e-36: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.5e+16) tmp = Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) + Float64(a * -4.0))); elseif (x <= -3.05e-288) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 2e-36) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -2.5e+16) tmp = t * (((x * 18.0) * (y * z)) + (a * -4.0)); elseif (x <= -3.05e-288) tmp = (b * c) - (27.0 * (j * k)); elseif (x <= 2e-36) tmp = (b * c) + (-4.0 * (t * a)); else tmp = (j * (k * -27.0)) + (-4.0 * (x * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.5e+16], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.05e-288], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-36], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \cdot 10^{+16}:\\
\;\;\;\;t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) + a \cdot -4\right)\\
\mathbf{elif}\;x \leq -3.05 \cdot 10^{-288}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-36}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -2.5e16Initial program 86.1%
Simplified87.6%
Taylor expanded in t around inf 59.3%
sub-neg59.3%
associate-*r*59.3%
*-commutative59.3%
*-commutative59.3%
distribute-rgt-neg-in59.3%
metadata-eval59.3%
Applied egg-rr59.3%
if -2.5e16 < x < -3.04999999999999991e-288Initial program 96.9%
Taylor expanded in i around 0 79.2%
Taylor expanded in a around 0 75.9%
Taylor expanded in t around 0 70.2%
if -3.04999999999999991e-288 < x < 1.9999999999999999e-36Initial program 95.2%
Simplified93.7%
Taylor expanded in x around 0 79.7%
Taylor expanded in j around 0 62.1%
if 1.9999999999999999e-36 < x Initial program 74.0%
Simplified83.3%
Taylor expanded in i around inf 55.7%
*-commutative55.7%
Simplified55.7%
Final simplification61.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -4.6e+19)
(* t (- (* 18.0 (* x (* y z))) (* a 4.0)))
(if (<= x -1.2e-286)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 6.8e-39)
(+ (* b c) (* -4.0 (* t a)))
(+ (* j (* k -27.0)) (* -4.0 (* x i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.6e+19) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= -1.2e-286) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 6.8e-39) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-4.6d+19)) then
tmp = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
else if (x <= (-1.2d-286)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 6.8d-39) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * (x * i))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -4.6e+19) {
tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0));
} else if (x <= -1.2e-286) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 6.8e-39) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -4.6e+19: tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)) elif x <= -1.2e-286: tmp = (b * c) - (27.0 * (j * k)) elif x <= 6.8e-39: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = (j * (k * -27.0)) + (-4.0 * (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -4.6e+19) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))); elseif (x <= -1.2e-286) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 6.8e-39) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(x * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -4.6e+19) tmp = t * ((18.0 * (x * (y * z))) - (a * 4.0)); elseif (x <= -1.2e-286) tmp = (b * c) - (27.0 * (j * k)); elseif (x <= 6.8e-39) tmp = (b * c) + (-4.0 * (t * a)); else tmp = (j * (k * -27.0)) + (-4.0 * (x * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -4.6e+19], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.2e-286], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-39], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+19}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-286}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-39}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -4.6e19Initial program 86.1%
Simplified87.6%
Taylor expanded in t around inf 59.3%
if -4.6e19 < x < -1.19999999999999997e-286Initial program 96.9%
Taylor expanded in i around 0 79.2%
Taylor expanded in a around 0 75.9%
Taylor expanded in t around 0 70.2%
if -1.19999999999999997e-286 < x < 6.7999999999999998e-39Initial program 95.2%
Simplified93.7%
Taylor expanded in x around 0 79.7%
Taylor expanded in j around 0 62.1%
if 6.7999999999999998e-39 < x Initial program 74.0%
Simplified83.3%
Taylor expanded in i around inf 55.7%
*-commutative55.7%
Simplified55.7%
Final simplification61.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= z -5.6e-84)
(* 18.0 (* t t_1))
(if (<= z -1.45e-225)
(* k (* j -27.0))
(if (<= z 2.5e+176) (+ (* b c) (* -4.0 (* t a))) (* t (* 18.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 = x * (y * z);
double tmp;
if (z <= -5.6e-84) {
tmp = 18.0 * (t * t_1);
} else if (z <= -1.45e-225) {
tmp = k * (j * -27.0);
} else if (z <= 2.5e+176) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t * (18.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 = x * (y * z)
if (z <= (-5.6d-84)) then
tmp = 18.0d0 * (t * t_1)
else if (z <= (-1.45d-225)) then
tmp = k * (j * (-27.0d0))
else if (z <= 2.5d+176) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = t * (18.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 = x * (y * z);
double tmp;
if (z <= -5.6e-84) {
tmp = 18.0 * (t * t_1);
} else if (z <= -1.45e-225) {
tmp = k * (j * -27.0);
} else if (z <= 2.5e+176) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = t * (18.0 * t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (y * z) tmp = 0 if z <= -5.6e-84: tmp = 18.0 * (t * t_1) elif z <= -1.45e-225: tmp = k * (j * -27.0) elif z <= 2.5e+176: tmp = (b * c) + (-4.0 * (t * a)) else: tmp = t * (18.0 * t_1) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (z <= -5.6e-84) tmp = Float64(18.0 * Float64(t * t_1)); elseif (z <= -1.45e-225) tmp = Float64(k * Float64(j * -27.0)); elseif (z <= 2.5e+176) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(t * Float64(18.0 * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = x * (y * z); tmp = 0.0; if (z <= -5.6e-84) tmp = 18.0 * (t * t_1); elseif (z <= -1.45e-225) tmp = k * (j * -27.0); elseif (z <= 2.5e+176) tmp = (b * c) + (-4.0 * (t * a)); else tmp = t * (18.0 * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.6e-84], N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.45e-225], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+176], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(18.0 * t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;z \leq -5.6 \cdot 10^{-84}:\\
\;\;\;\;18 \cdot \left(t \cdot t_1\right)\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-225}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+176}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot t_1\right)\\
\end{array}
\end{array}
if z < -5.59999999999999964e-84Initial program 80.0%
Simplified82.5%
associate--l+82.5%
*-commutative82.5%
fma-neg82.5%
fma-def82.5%
*-commutative82.5%
*-commutative82.5%
Applied egg-rr82.5%
Taylor expanded in y around inf 41.2%
if -5.59999999999999964e-84 < z < -1.4499999999999999e-225Initial program 96.6%
Simplified96.6%
associate-*r*96.6%
distribute-rgt-out--96.6%
cancel-sign-sub-inv96.6%
associate-*l*95.7%
fma-def95.7%
associate-*l*95.7%
Applied egg-rr95.7%
Taylor expanded in a around 0 78.5%
associate--r+78.5%
Simplified81.6%
Taylor expanded in j around inf 36.2%
*-commutative36.2%
*-commutative36.2%
associate-*r*36.2%
Simplified36.2%
if -1.4499999999999999e-225 < z < 2.5e176Initial program 93.6%
Simplified91.0%
Taylor expanded in x around 0 63.6%
Taylor expanded in j around 0 49.8%
if 2.5e176 < z Initial program 79.0%
Simplified79.3%
Taylor expanded in t around inf 59.2%
sub-neg59.2%
associate-*r*59.3%
*-commutative59.3%
*-commutative59.3%
distribute-rgt-neg-in59.3%
metadata-eval59.3%
Applied egg-rr59.3%
Taylor expanded in x around inf 48.0%
Final simplification45.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= t -2.3e-9)
t_1
(if (<= t 3.45e+37)
(+ (* b c) (* j (* k -27.0)))
(if (<= t 1.56e+116) (* t (* x (* z (* 18.0 y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (t <= -2.3e-9) {
tmp = t_1;
} else if (t <= 3.45e+37) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 1.56e+116) {
tmp = t * (x * (z * (18.0 * y)));
} 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))
if (t <= (-2.3d-9)) then
tmp = t_1
else if (t <= 3.45d+37) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (t <= 1.56d+116) then
tmp = t * (x * (z * (18.0d0 * y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (t <= -2.3e-9) {
tmp = t_1;
} else if (t <= 3.45e+37) {
tmp = (b * c) + (j * (k * -27.0));
} else if (t <= 1.56e+116) {
tmp = t * (x * (z * (18.0 * y)));
} 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)) tmp = 0 if t <= -2.3e-9: tmp = t_1 elif t <= 3.45e+37: tmp = (b * c) + (j * (k * -27.0)) elif t <= 1.56e+116: tmp = t * (x * (z * (18.0 * y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (t <= -2.3e-9) tmp = t_1; elseif (t <= 3.45e+37) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (t <= 1.56e+116) tmp = Float64(t * Float64(x * Float64(z * Float64(18.0 * y)))); 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)); tmp = 0.0; if (t <= -2.3e-9) tmp = t_1; elseif (t <= 3.45e+37) tmp = (b * c) + (j * (k * -27.0)); elseif (t <= 1.56e+116) tmp = t * (x * (z * (18.0 * y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e-9], t$95$1, If[LessEqual[t, 3.45e+37], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.56e+116], N[(t * N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.45 \cdot 10^{+37}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;t \leq 1.56 \cdot 10^{+116}:\\
\;\;\;\;t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.2999999999999999e-9 or 1.56000000000000002e116 < t Initial program 87.6%
Simplified92.7%
Taylor expanded in x around 0 66.4%
Taylor expanded in j around 0 60.1%
if -2.2999999999999999e-9 < t < 3.4499999999999998e37Initial program 88.4%
Simplified84.4%
Taylor expanded in b around inf 55.4%
if 3.4499999999999998e37 < t < 1.56000000000000002e116Initial program 84.6%
Simplified92.2%
Taylor expanded in t around inf 68.7%
sub-neg68.7%
associate-*r*68.7%
*-commutative68.7%
*-commutative68.7%
distribute-rgt-neg-in68.7%
metadata-eval68.7%
Applied egg-rr68.7%
Taylor expanded in x around inf 68.8%
*-commutative68.8%
associate-*r*68.8%
*-commutative68.8%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Final simplification57.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))))
(if (<= t -2.3e-9)
t_1
(if (<= t 1.4e+38)
(- (* b c) (* 27.0 (* j k)))
(if (<= t 5e+116) (* t (* x (* z (* 18.0 y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (t <= -2.3e-9) {
tmp = t_1;
} else if (t <= 1.4e+38) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 5e+116) {
tmp = t * (x * (z * (18.0 * y)));
} 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))
if (t <= (-2.3d-9)) then
tmp = t_1
else if (t <= 1.4d+38) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t <= 5d+116) then
tmp = t * (x * (z * (18.0d0 * y)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double tmp;
if (t <= -2.3e-9) {
tmp = t_1;
} else if (t <= 1.4e+38) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t <= 5e+116) {
tmp = t * (x * (z * (18.0 * y)));
} 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)) tmp = 0 if t <= -2.3e-9: tmp = t_1 elif t <= 1.4e+38: tmp = (b * c) - (27.0 * (j * k)) elif t <= 5e+116: tmp = t * (x * (z * (18.0 * y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (t <= -2.3e-9) tmp = t_1; elseif (t <= 1.4e+38) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t <= 5e+116) tmp = Float64(t * Float64(x * Float64(z * Float64(18.0 * y)))); 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)); tmp = 0.0; if (t <= -2.3e-9) tmp = t_1; elseif (t <= 1.4e+38) tmp = (b * c) - (27.0 * (j * k)); elseif (t <= 5e+116) tmp = t * (x * (z * (18.0 * y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e-9], t$95$1, If[LessEqual[t, 1.4e+38], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+116], N[(t * N[(x * N[(z * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{+38}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+116}:\\
\;\;\;\;t \cdot \left(x \cdot \left(z \cdot \left(18 \cdot y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.2999999999999999e-9 or 5.00000000000000025e116 < t Initial program 87.6%
Simplified92.7%
Taylor expanded in x around 0 66.4%
Taylor expanded in j around 0 60.1%
if -2.2999999999999999e-9 < t < 1.4e38Initial program 88.4%
Taylor expanded in i around 0 67.7%
Taylor expanded in a around 0 63.3%
Taylor expanded in t around 0 55.4%
if 1.4e38 < t < 5.00000000000000025e116Initial program 84.6%
Simplified92.2%
Taylor expanded in t around inf 68.7%
sub-neg68.7%
associate-*r*68.7%
*-commutative68.7%
*-commutative68.7%
distribute-rgt-neg-in68.7%
metadata-eval68.7%
Applied egg-rr68.7%
Taylor expanded in x around inf 68.8%
*-commutative68.8%
associate-*r*68.8%
*-commutative68.8%
associate-*l*68.8%
*-commutative68.8%
Simplified68.8%
Final simplification57.9%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -4.2e+112) (not (<= (* b c) 5.6e+75))) (* b c) (* (* j k) -27.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.2e+112) || !((b * c) <= 5.6e+75)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-4.2d+112)) .or. (.not. ((b * c) <= 5.6d+75))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -4.2e+112) || !((b * c) <= 5.6e+75)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -4.2e+112) or not ((b * c) <= 5.6e+75): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -4.2e+112) || !(Float64(b * c) <= 5.6e+75)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (((b * c) <= -4.2e+112) || ~(((b * c) <= 5.6e+75))) tmp = b * c; else tmp = (j * k) * -27.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -4.2e+112], N[Not[LessEqual[N[(b * c), $MachinePrecision], 5.6e+75]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.2 \cdot 10^{+112} \lor \neg \left(b \cdot c \leq 5.6 \cdot 10^{+75}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -4.1999999999999998e112 or 5.60000000000000023e75 < (*.f64 b c) Initial program 85.2%
Simplified86.3%
associate--l+86.3%
*-commutative86.3%
fma-neg86.3%
fma-def86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in b around inf 61.3%
if -4.1999999999999998e112 < (*.f64 b c) < 5.60000000000000023e75Initial program 89.5%
Simplified88.4%
Taylor expanded in j around inf 28.3%
Final simplification40.6%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.15e+114) (not (<= (* b c) 6.8e+79))) (* b c) (* j (* k -27.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.15e+114) || !((b * c) <= 6.8e+79)) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.15d+114)) .or. (.not. ((b * c) <= 6.8d+79))) then
tmp = b * c
else
tmp = j * (k * (-27.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.15e+114) || !((b * c) <= 6.8e+79)) {
tmp = b * c;
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.15e+114) or not ((b * c) <= 6.8e+79): tmp = b * c else: tmp = j * (k * -27.0) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.15e+114) || !(Float64(b * c) <= 6.8e+79)) tmp = Float64(b * c); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (((b * c) <= -2.15e+114) || ~(((b * c) <= 6.8e+79))) tmp = b * c; else tmp = j * (k * -27.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.15e+114], N[Not[LessEqual[N[(b * c), $MachinePrecision], 6.8e+79]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.15 \cdot 10^{+114} \lor \neg \left(b \cdot c \leq 6.8 \cdot 10^{+79}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.15e114 or 6.80000000000000063e79 < (*.f64 b c) Initial program 85.2%
Simplified86.3%
associate--l+86.3%
*-commutative86.3%
fma-neg86.3%
fma-def86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in b around inf 61.3%
if -2.15e114 < (*.f64 b c) < 6.80000000000000063e79Initial program 89.5%
Simplified88.3%
associate--l+88.3%
*-commutative88.3%
fma-neg88.3%
fma-def88.3%
*-commutative88.3%
*-commutative88.3%
Applied egg-rr88.3%
Taylor expanded in j around inf 28.3%
*-commutative28.3%
associate-*r*28.3%
Simplified28.3%
Final simplification40.6%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.5e+111) (not (<= (* b c) 4.1e+74))) (* b c) (* k (* j -27.0))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.5e+111) || !((b * c) <= 4.1e+74)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-1.5d+111)) .or. (.not. ((b * c) <= 4.1d+74))) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -1.5e+111) || !((b * c) <= 4.1e+74)) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.5e+111) or not ((b * c) <= 4.1e+74): tmp = b * c else: tmp = k * (j * -27.0) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.5e+111) || !(Float64(b * c) <= 4.1e+74)) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (((b * c) <= -1.5e+111) || ~(((b * c) <= 4.1e+74))) tmp = b * c; else tmp = k * (j * -27.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.5e+111], N[Not[LessEqual[N[(b * c), $MachinePrecision], 4.1e+74]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+111} \lor \neg \left(b \cdot c \leq 4.1 \cdot 10^{+74}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.5e111 or 4.1e74 < (*.f64 b c) Initial program 85.2%
Simplified86.3%
associate--l+86.3%
*-commutative86.3%
fma-neg86.3%
fma-def86.3%
*-commutative86.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in b around inf 61.3%
if -1.5e111 < (*.f64 b c) < 4.1e74Initial program 89.5%
Simplified88.3%
associate-*r*91.4%
distribute-rgt-out--89.5%
cancel-sign-sub-inv89.5%
associate-*l*88.0%
fma-def88.0%
associate-*l*88.0%
Applied egg-rr88.0%
Taylor expanded in a around 0 71.2%
associate--r+71.2%
Simplified78.6%
Taylor expanded in j around inf 28.3%
*-commutative28.3%
*-commutative28.3%
associate-*r*28.3%
Simplified28.3%
Final simplification40.6%
(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 87.9%
Simplified87.6%
associate--l+87.6%
*-commutative87.6%
fma-neg87.6%
fma-def87.6%
*-commutative87.6%
*-commutative87.6%
Applied egg-rr87.6%
Taylor expanded in b around inf 26.5%
Final simplification26.5%
(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 2023322
(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)))