
(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 19 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 2e+306)
t_1
(if (<= t_1 INFINITY)
(-
(+ (* b c) (* t (- (* x (* 18.0 (* y z))) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* x (- (* 18.0 (* t (* y z))) (* 4.0 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 = (((((((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 <= 2e+306) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = ((b * c) + (t * ((x * (18.0 * (y * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
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 <= 2e+306) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * ((x * (18.0 * (y * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
}
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 <= 2e+306: tmp = t_1 elif t_1 <= math.inf: tmp = ((b * c) + (t * ((x * (18.0 * (y * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) 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 <= 2e+306) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(x * Float64(18.0 * Float64(y * z))) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); 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 <= 2e+306) tmp = t_1; elseif (t_1 <= Inf) tmp = ((b * c) + (t * ((x * (18.0 * (y * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))); else tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)); 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, 2e+306], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $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 2 \cdot 10^{+306}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(x \cdot \left(18 \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < 2.00000000000000003e306Initial program 99.4%
if 2.00000000000000003e306 < (-.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 91.3%
Simplified96.6%
Taylor expanded in x around 0 96.6%
associate-*r*96.6%
*-commutative96.6%
associate-*l*96.6%
Simplified96.6%
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%
Taylor expanded in x around inf 54.9%
Final simplification94.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))) (t_2 (* x (* i -4.0))))
(if (<= (* b c) -6.1e+172)
(* b c)
(if (<= (* b c) -14600000.0)
t_1
(if (<= (* b c) -5.6e-108)
(* j (* k -27.0))
(if (<= (* b c) -7.3e-140)
t_1
(if (<= (* b c) -2.6e-228)
t_2
(if (<= (* b c) 1.75e-82)
(* k (* j -27.0))
(if (<= (* b c) 7.5e+161) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double t_2 = x * (i * -4.0);
double tmp;
if ((b * c) <= -6.1e+172) {
tmp = b * c;
} else if ((b * c) <= -14600000.0) {
tmp = t_1;
} else if ((b * c) <= -5.6e-108) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -7.3e-140) {
tmp = t_1;
} else if ((b * c) <= -2.6e-228) {
tmp = t_2;
} else if ((b * c) <= 1.75e-82) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 7.5e+161) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
t_2 = x * (i * (-4.0d0))
if ((b * c) <= (-6.1d+172)) then
tmp = b * c
else if ((b * c) <= (-14600000.0d0)) then
tmp = t_1
else if ((b * c) <= (-5.6d-108)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= (-7.3d-140)) then
tmp = t_1
else if ((b * c) <= (-2.6d-228)) then
tmp = t_2
else if ((b * c) <= 1.75d-82) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 7.5d+161) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double t_2 = x * (i * -4.0);
double tmp;
if ((b * c) <= -6.1e+172) {
tmp = b * c;
} else if ((b * c) <= -14600000.0) {
tmp = t_1;
} else if ((b * c) <= -5.6e-108) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -7.3e-140) {
tmp = t_1;
} else if ((b * c) <= -2.6e-228) {
tmp = t_2;
} else if ((b * c) <= 1.75e-82) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 7.5e+161) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) t_2 = x * (i * -4.0) tmp = 0 if (b * c) <= -6.1e+172: tmp = b * c elif (b * c) <= -14600000.0: tmp = t_1 elif (b * c) <= -5.6e-108: tmp = j * (k * -27.0) elif (b * c) <= -7.3e-140: tmp = t_1 elif (b * c) <= -2.6e-228: tmp = t_2 elif (b * c) <= 1.75e-82: tmp = k * (j * -27.0) elif (b * c) <= 7.5e+161: tmp = t_2 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) t_2 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (Float64(b * c) <= -6.1e+172) tmp = Float64(b * c); elseif (Float64(b * c) <= -14600000.0) tmp = t_1; elseif (Float64(b * c) <= -5.6e-108) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= -7.3e-140) tmp = t_1; elseif (Float64(b * c) <= -2.6e-228) tmp = t_2; elseif (Float64(b * c) <= 1.75e-82) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 7.5e+161) tmp = t_2; else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (a * -4.0); t_2 = x * (i * -4.0); tmp = 0.0; if ((b * c) <= -6.1e+172) tmp = b * c; elseif ((b * c) <= -14600000.0) tmp = t_1; elseif ((b * c) <= -5.6e-108) tmp = j * (k * -27.0); elseif ((b * c) <= -7.3e-140) tmp = t_1; elseif ((b * c) <= -2.6e-228) tmp = t_2; elseif ((b * c) <= 1.75e-82) tmp = k * (j * -27.0); elseif ((b * c) <= 7.5e+161) tmp = t_2; else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -6.1e+172], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -14600000.0], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -5.6e-108], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -7.3e-140], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2.6e-228], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.75e-82], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.5e+161], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
t_2 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -6.1 \cdot 10^{+172}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -14600000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -5.6 \cdot 10^{-108}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -7.3 \cdot 10^{-140}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -2.6 \cdot 10^{-228}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq 1.75 \cdot 10^{-82}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{+161}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.0999999999999998e172 or 7.4999999999999995e161 < (*.f64 b c) Initial program 87.3%
Simplified85.9%
Taylor expanded in b around inf 64.8%
if -6.0999999999999998e172 < (*.f64 b c) < -1.46e7 or -5.6e-108 < (*.f64 b c) < -7.30000000000000027e-140Initial program 84.0%
Simplified93.7%
Taylor expanded in a around inf 48.9%
*-commutative48.9%
*-commutative48.9%
associate-*r*48.9%
Simplified48.9%
if -1.46e7 < (*.f64 b c) < -5.6e-108Initial program 91.8%
Simplified91.5%
Taylor expanded in j around inf 42.1%
*-commutative42.1%
associate-*l*42.2%
Simplified42.2%
if -7.30000000000000027e-140 < (*.f64 b c) < -2.6e-228 or 1.7499999999999999e-82 < (*.f64 b c) < 7.4999999999999995e161Initial program 83.9%
Simplified85.8%
Taylor expanded in i around inf 42.8%
associate-*r*42.8%
*-commutative42.8%
Simplified42.8%
if -2.6e-228 < (*.f64 b c) < 1.7499999999999999e-82Initial program 94.2%
Simplified91.5%
Taylor expanded in j around inf 41.0%
associate-*r*41.0%
Simplified41.0%
Final simplification49.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 2.4e+249)
(-
(+ (* b c) (* t (- (* x (* 18.0 (* y z))) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* 18.0 (* x (* 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 tmp;
if (z <= 2.4e+249) {
tmp = ((b * c) + (t * ((x * (18.0 * (y * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = 18.0 * (x * (z * (y * t)));
}
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 <= 2.4d+249) then
tmp = ((b * c) + (t * ((x * (18.0d0 * (y * z))) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = 18.0d0 * (x * (z * (y * t)))
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 <= 2.4e+249) {
tmp = ((b * c) + (t * ((x * (18.0 * (y * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = 18.0 * (x * (z * (y * t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 2.4e+249: tmp = ((b * c) + (t * ((x * (18.0 * (y * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = 18.0 * (x * (z * (y * t))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 2.4e+249) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(x * Float64(18.0 * Float64(y * z))) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(18.0 * Float64(x * Float64(z * Float64(y * t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (z <= 2.4e+249) tmp = ((b * c) + (t * ((x * (18.0 * (y * z))) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))); else tmp = 18.0 * (x * (z * (y * t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 2.4e+249], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.4 \cdot 10^{+249}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(x \cdot \left(18 \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if z < 2.4e249Initial program 89.2%
Simplified89.7%
Taylor expanded in x around 0 89.7%
associate-*r*89.7%
*-commutative89.7%
associate-*l*89.7%
Simplified89.7%
if 2.4e249 < z Initial program 57.5%
Simplified57.5%
Taylor expanded in y around inf 58.6%
*-commutative58.6%
associate-*l*58.6%
*-commutative58.6%
associate-*l*71.9%
Simplified71.9%
Final simplification89.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(t_2 (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))))
(if (<= x -1.75e+248)
t_1
(if (<= x -1.9e+56)
(- t_2 (* 27.0 (* j k)))
(if (<= x 3e+61)
(- (+ (* b c) (* -4.0 (* t a))) (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(if (<= x 3.8e+136) 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (x <= -1.75e+248) {
tmp = t_1;
} else if (x <= -1.9e+56) {
tmp = t_2 - (27.0 * (j * k));
} else if (x <= 3e+61) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (x <= 3.8e+136) {
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 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
t_2 = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
if (x <= (-1.75d+248)) then
tmp = t_1
else if (x <= (-1.9d+56)) then
tmp = t_2 - (27.0d0 * (j * k))
else if (x <= 3d+61) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else if (x <= 3.8d+136) 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
double tmp;
if (x <= -1.75e+248) {
tmp = t_1;
} else if (x <= -1.9e+56) {
tmp = t_2 - (27.0 * (j * k));
} else if (x <= 3e+61) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else if (x <= 3.8e+136) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) tmp = 0 if x <= -1.75e+248: tmp = t_1 elif x <= -1.9e+56: tmp = t_2 - (27.0 * (j * k)) elif x <= 3e+61: tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k))) elif x <= 3.8e+136: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) t_2 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) tmp = 0.0 if (x <= -1.75e+248) tmp = t_1; elseif (x <= -1.9e+56) tmp = Float64(t_2 - Float64(27.0 * Float64(j * k))); elseif (x <= 3e+61) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); elseif (x <= 3.8e+136) 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 = x * ((18.0 * (t * (y * z))) - (4.0 * i)); t_2 = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))); tmp = 0.0; if (x <= -1.75e+248) tmp = t_1; elseif (x <= -1.9e+56) tmp = t_2 - (27.0 * (j * k)); elseif (x <= 3e+61) tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k))); elseif (x <= 3.8e+136) 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[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.75e+248], t$95$1, If[LessEqual[x, -1.9e+56], N[(t$95$2 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3e+61], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+136], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
t_2 := b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+248}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{+56}:\\
\;\;\;\;t_2 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 3 \cdot 10^{+61}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+136}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -1.75000000000000011e248 or 3.80000000000000015e136 < x Initial program 78.2%
Simplified85.2%
Taylor expanded in x around inf 86.4%
if -1.75000000000000011e248 < x < -1.89999999999999998e56Initial program 76.8%
Simplified83.3%
Taylor expanded in i around 0 80.0%
if -1.89999999999999998e56 < x < 3e61Initial program 93.1%
Simplified90.2%
Taylor expanded in x around 0 87.6%
if 3e61 < x < 3.80000000000000015e136Initial program 99.9%
Simplified100.0%
Taylor expanded in i around 0 100.0%
Taylor expanded in j around 0 100.0%
Final simplification87.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= a -9.6e+81) (not (<= a 3.4e+44)))
(- (+ (* b c) (* -4.0 (* t a))) (+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(+
(* -27.0 (* j k))
(- (* b c) (* x (+ (* 4.0 i) (* (* t (* y z)) -18.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 ((a <= -9.6e+81) || !(a <= 3.4e+44)) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (-27.0 * (j * k)) + ((b * c) - (x * ((4.0 * i) + ((t * (y * z)) * -18.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 ((a <= (-9.6d+81)) .or. (.not. (a <= 3.4d+44))) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = ((-27.0d0) * (j * k)) + ((b * c) - (x * ((4.0d0 * i) + ((t * (y * z)) * (-18.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 ((a <= -9.6e+81) || !(a <= 3.4e+44)) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = (-27.0 * (j * k)) + ((b * c) - (x * ((4.0 * i) + ((t * (y * z)) * -18.0))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (a <= -9.6e+81) or not (a <= 3.4e+44): tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = (-27.0 * (j * k)) + ((b * c) - (x * ((4.0 * i) + ((t * (y * z)) * -18.0)))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((a <= -9.6e+81) || !(a <= 3.4e+44)) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(Float64(-27.0 * Float64(j * k)) + Float64(Float64(b * c) - Float64(x * Float64(Float64(4.0 * i) + Float64(Float64(t * Float64(y * z)) * -18.0))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((a <= -9.6e+81) || ~((a <= 3.4e+44))) tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k))); else tmp = (-27.0 * (j * k)) + ((b * c) - (x * ((4.0 * i) + ((t * (y * z)) * -18.0)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -9.6e+81], N[Not[LessEqual[a, 3.4e+44]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision] + N[(N[(b * c), $MachinePrecision] - N[(x * N[(N[(4.0 * i), $MachinePrecision] + N[(N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] * -18.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.6 \cdot 10^{+81} \lor \neg \left(a \leq 3.4 \cdot 10^{+44}\right):\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right) + \left(b \cdot c - x \cdot \left(4 \cdot i + \left(t \cdot \left(y \cdot z\right)\right) \cdot -18\right)\right)\\
\end{array}
\end{array}
if a < -9.59999999999999958e81 or 3.4e44 < a Initial program 88.4%
Simplified87.5%
Taylor expanded in x around 0 89.1%
if -9.59999999999999958e81 < a < 3.4e44Initial program 88.4%
Simplified89.7%
Taylor expanded in x around -inf 89.6%
Simplified91.6%
Taylor expanded in a around 0 88.4%
Final simplification88.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= (* b c) -4e+171)
(* b c)
(if (<= (* b c) -6100000.0)
t_1
(if (<= (* b c) 24500000000.0)
(* j (* k -27.0))
(if (<= (* b c) 3.65e+98)
t_1
(if (<= (* b c) 3.5e+100) (* -27.0 (* j k)) (* b c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if ((b * c) <= -4e+171) {
tmp = b * c;
} else if ((b * c) <= -6100000.0) {
tmp = t_1;
} else if ((b * c) <= 24500000000.0) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 3.65e+98) {
tmp = t_1;
} else if ((b * c) <= 3.5e+100) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
if ((b * c) <= (-4d+171)) then
tmp = b * c
else if ((b * c) <= (-6100000.0d0)) then
tmp = t_1
else if ((b * c) <= 24500000000.0d0) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 3.65d+98) then
tmp = t_1
else if ((b * c) <= 3.5d+100) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if ((b * c) <= -4e+171) {
tmp = b * c;
} else if ((b * c) <= -6100000.0) {
tmp = t_1;
} else if ((b * c) <= 24500000000.0) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 3.65e+98) {
tmp = t_1;
} else if ((b * c) <= 3.5e+100) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if (b * c) <= -4e+171: tmp = b * c elif (b * c) <= -6100000.0: tmp = t_1 elif (b * c) <= 24500000000.0: tmp = j * (k * -27.0) elif (b * c) <= 3.65e+98: tmp = t_1 elif (b * c) <= 3.5e+100: tmp = -27.0 * (j * k) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (Float64(b * c) <= -4e+171) tmp = Float64(b * c); elseif (Float64(b * c) <= -6100000.0) tmp = t_1; elseif (Float64(b * c) <= 24500000000.0) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 3.65e+98) tmp = t_1; elseif (Float64(b * c) <= 3.5e+100) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (a * -4.0); tmp = 0.0; if ((b * c) <= -4e+171) tmp = b * c; elseif ((b * c) <= -6100000.0) tmp = t_1; elseif ((b * c) <= 24500000000.0) tmp = j * (k * -27.0); elseif ((b * c) <= 3.65e+98) tmp = t_1; elseif ((b * c) <= 3.5e+100) tmp = -27.0 * (j * k); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -4e+171], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -6100000.0], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 24500000000.0], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.65e+98], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 3.5e+100], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -4 \cdot 10^{+171}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -6100000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 24500000000:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 3.65 \cdot 10^{+98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+100}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.99999999999999982e171 or 3.49999999999999976e100 < (*.f64 b c) Initial program 88.1%
Simplified85.7%
Taylor expanded in b around inf 62.0%
if -3.99999999999999982e171 < (*.f64 b c) < -6.1e6 or 2.45e10 < (*.f64 b c) < 3.6500000000000001e98Initial program 79.7%
Simplified85.8%
Taylor expanded in a around inf 39.5%
*-commutative39.5%
*-commutative39.5%
associate-*r*39.5%
Simplified39.5%
if -6.1e6 < (*.f64 b c) < 2.45e10Initial program 91.6%
Simplified91.6%
Taylor expanded in j around inf 35.3%
*-commutative35.3%
associate-*l*35.3%
Simplified35.3%
if 3.6500000000000001e98 < (*.f64 b c) < 3.49999999999999976e100Initial program 98.4%
Simplified98.4%
Taylor expanded in j around inf 98.4%
Final simplification44.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))))
(if (<= (* b c) -4.1e+228)
(* b c)
(if (<= (* b c) -1.5e-228)
t_1
(if (<= (* b c) -1e-314)
(* k (* j -27.0))
(if (<= (* b c) 1.3e+177) t_1 (* 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 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -4.1e+228) {
tmp = b * c;
} else if ((b * c) <= -1.5e-228) {
tmp = t_1;
} else if ((b * c) <= -1e-314) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 1.3e+177) {
tmp = t_1;
} 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 = (-4.0d0) * ((t * a) + (x * i))
if ((b * c) <= (-4.1d+228)) then
tmp = b * c
else if ((b * c) <= (-1.5d-228)) then
tmp = t_1
else if ((b * c) <= (-1d-314)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 1.3d+177) then
tmp = t_1
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 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -4.1e+228) {
tmp = b * c;
} else if ((b * c) <= -1.5e-228) {
tmp = t_1;
} else if ((b * c) <= -1e-314) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 1.3e+177) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) tmp = 0 if (b * c) <= -4.1e+228: tmp = b * c elif (b * c) <= -1.5e-228: tmp = t_1 elif (b * c) <= -1e-314: tmp = k * (j * -27.0) elif (b * c) <= 1.3e+177: tmp = t_1 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -4.1e+228) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.5e-228) tmp = t_1; elseif (Float64(b * c) <= -1e-314) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 1.3e+177) tmp = t_1; 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 = -4.0 * ((t * a) + (x * i)); tmp = 0.0; if ((b * c) <= -4.1e+228) tmp = b * c; elseif ((b * c) <= -1.5e-228) tmp = t_1; elseif ((b * c) <= -1e-314) tmp = k * (j * -27.0); elseif ((b * c) <= 1.3e+177) tmp = t_1; 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[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -4.1e+228], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.5e-228], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1e-314], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.3e+177], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -4.1 \cdot 10^{+228}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.5 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-314}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 1.3 \cdot 10^{+177}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -4.1e228 or 1.2999999999999999e177 < (*.f64 b c) Initial program 83.3%
Simplified81.5%
Taylor expanded in b around inf 76.4%
if -4.1e228 < (*.f64 b c) < -1.5e-228 or -9.9999999996e-315 < (*.f64 b c) < 1.2999999999999999e177Initial program 89.8%
Simplified90.9%
Taylor expanded in x around 0 80.0%
Taylor expanded in j around 0 59.5%
Taylor expanded in b around 0 52.1%
cancel-sign-sub-inv52.1%
*-commutative52.1%
metadata-eval52.1%
*-commutative52.1%
distribute-lft-out52.1%
*-commutative52.1%
Simplified52.1%
if -1.5e-228 < (*.f64 b c) < -9.9999999996e-315Initial program 88.7%
Simplified88.7%
Taylor expanded in j around inf 77.5%
associate-*r*78.0%
Simplified78.0%
Final simplification58.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a)))) (t_2 (* -4.0 (+ (* t a) (* x i)))))
(if (<= (* b c) -8.5e+132)
t_1
(if (<= (* b c) -3.2e-228)
t_2
(if (<= (* b c) -1e-314)
(* k (* j -27.0))
(if (<= (* b c) 9.5e+170) 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 = (b * c) + (-4.0 * (t * a));
double t_2 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -8.5e+132) {
tmp = t_1;
} else if ((b * c) <= -3.2e-228) {
tmp = t_2;
} else if ((b * c) <= -1e-314) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 9.5e+170) {
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 = (b * c) + ((-4.0d0) * (t * a))
t_2 = (-4.0d0) * ((t * a) + (x * i))
if ((b * c) <= (-8.5d+132)) then
tmp = t_1
else if ((b * c) <= (-3.2d-228)) then
tmp = t_2
else if ((b * c) <= (-1d-314)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 9.5d+170) 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 = (b * c) + (-4.0 * (t * a));
double t_2 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -8.5e+132) {
tmp = t_1;
} else if ((b * c) <= -3.2e-228) {
tmp = t_2;
} else if ((b * c) <= -1e-314) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 9.5e+170) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) t_2 = -4.0 * ((t * a) + (x * i)) tmp = 0 if (b * c) <= -8.5e+132: tmp = t_1 elif (b * c) <= -3.2e-228: tmp = t_2 elif (b * c) <= -1e-314: tmp = k * (j * -27.0) elif (b * c) <= 9.5e+170: 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(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -8.5e+132) tmp = t_1; elseif (Float64(b * c) <= -3.2e-228) tmp = t_2; elseif (Float64(b * c) <= -1e-314) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 9.5e+170) 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 = (b * c) + (-4.0 * (t * a)); t_2 = -4.0 * ((t * a) + (x * i)); tmp = 0.0; if ((b * c) <= -8.5e+132) tmp = t_1; elseif ((b * c) <= -3.2e-228) tmp = t_2; elseif ((b * c) <= -1e-314) tmp = k * (j * -27.0); elseif ((b * c) <= 9.5e+170) 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[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -8.5e+132], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -3.2e-228], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -1e-314], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9.5e+170], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -8.5 \cdot 10^{+132}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -3.2 \cdot 10^{-228}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-314}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 9.5 \cdot 10^{+170}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (*.f64 b c) < -8.49999999999999969e132 or 9.5000000000000005e170 < (*.f64 b c) Initial program 87.9%
Simplified86.6%
Taylor expanded in x around -inf 85.3%
Simplified88.0%
Taylor expanded in j around 0 83.4%
Taylor expanded in x around 0 69.6%
if -8.49999999999999969e132 < (*.f64 b c) < -3.20000000000000022e-228 or -9.9999999996e-315 < (*.f64 b c) < 9.5000000000000005e170Initial program 88.5%
Simplified89.8%
Taylor expanded in x around 0 79.5%
Taylor expanded in j around 0 58.8%
Taylor expanded in b around 0 54.0%
cancel-sign-sub-inv54.0%
*-commutative54.0%
metadata-eval54.0%
*-commutative54.0%
distribute-lft-out54.0%
*-commutative54.0%
Simplified54.0%
if -3.20000000000000022e-228 < (*.f64 b c) < -9.9999999996e-315Initial program 88.7%
Simplified88.7%
Taylor expanded in j around inf 77.5%
associate-*r*78.0%
Simplified78.0%
Final simplification59.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (+ (* t a) (* x i)))))
(if (<= (* b c) -8.2e+132)
(+ (* b c) (* -4.0 (* t a)))
(if (<= (* b c) -1.5e-228)
t_1
(if (<= (* b c) -1e-314)
(* k (* j -27.0))
(if (<= (* b c) 1.16e+85) t_1 (- (* b c) (* 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 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -8.2e+132) {
tmp = (b * c) + (-4.0 * (t * a));
} else if ((b * c) <= -1.5e-228) {
tmp = t_1;
} else if ((b * c) <= -1e-314) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 1.16e+85) {
tmp = t_1;
} else {
tmp = (b * c) - (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 = (-4.0d0) * ((t * a) + (x * i))
if ((b * c) <= (-8.2d+132)) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else if ((b * c) <= (-1.5d-228)) then
tmp = t_1
else if ((b * c) <= (-1d-314)) then
tmp = k * (j * (-27.0d0))
else if ((b * c) <= 1.16d+85) then
tmp = t_1
else
tmp = (b * c) - (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 = -4.0 * ((t * a) + (x * i));
double tmp;
if ((b * c) <= -8.2e+132) {
tmp = (b * c) + (-4.0 * (t * a));
} else if ((b * c) <= -1.5e-228) {
tmp = t_1;
} else if ((b * c) <= -1e-314) {
tmp = k * (j * -27.0);
} else if ((b * c) <= 1.16e+85) {
tmp = t_1;
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * ((t * a) + (x * i)) tmp = 0 if (b * c) <= -8.2e+132: tmp = (b * c) + (-4.0 * (t * a)) elif (b * c) <= -1.5e-228: tmp = t_1 elif (b * c) <= -1e-314: tmp = k * (j * -27.0) elif (b * c) <= 1.16e+85: tmp = t_1 else: tmp = (b * c) - (4.0 * (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -8.2e+132) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); elseif (Float64(b * c) <= -1.5e-228) tmp = t_1; elseif (Float64(b * c) <= -1e-314) tmp = Float64(k * Float64(j * -27.0)); elseif (Float64(b * c) <= 1.16e+85) tmp = t_1; else tmp = Float64(Float64(b * c) - 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 = -4.0 * ((t * a) + (x * i)); tmp = 0.0; if ((b * c) <= -8.2e+132) tmp = (b * c) + (-4.0 * (t * a)); elseif ((b * c) <= -1.5e-228) tmp = t_1; elseif ((b * c) <= -1e-314) tmp = k * (j * -27.0); elseif ((b * c) <= 1.16e+85) tmp = t_1; else tmp = (b * c) - (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[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -8.2e+132], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.5e-228], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -1e-314], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.16e+85], t$95$1, N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -8.2 \cdot 10^{+132}:\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq -1.5 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \cdot c \leq -1 \cdot 10^{-314}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 1.16 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -8.19999999999999983e132Initial program 90.2%
Simplified87.7%
Taylor expanded in x around -inf 85.3%
Simplified90.2%
Taylor expanded in j around 0 82.0%
Taylor expanded in x around 0 62.9%
if -8.19999999999999983e132 < (*.f64 b c) < -1.5e-228 or -9.9999999996e-315 < (*.f64 b c) < 1.15999999999999995e85Initial program 88.5%
Simplified89.7%
Taylor expanded in x around 0 78.8%
Taylor expanded in j around 0 58.1%
Taylor expanded in b around 0 54.2%
cancel-sign-sub-inv54.2%
*-commutative54.2%
metadata-eval54.2%
*-commutative54.2%
distribute-lft-out54.2%
*-commutative54.2%
Simplified54.2%
if -1.5e-228 < (*.f64 b c) < -9.9999999996e-315Initial program 88.7%
Simplified88.7%
Taylor expanded in j around inf 77.5%
associate-*r*78.0%
Simplified78.0%
if 1.15999999999999995e85 < (*.f64 b c) Initial program 86.3%
Simplified86.6%
Taylor expanded in x around 0 84.2%
Taylor expanded in j around 0 80.7%
Taylor expanded in a around 0 74.0%
Final simplification59.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))))
(t_2 (- (* b c) (* 27.0 (* j k))))
(t_3 (* -4.0 (+ (* t a) (* x i)))))
(if (<= a -3.3e+81)
t_3
(if (<= a -9e-156)
t_2
(if (<= a -3e-238)
t_1
(if (<= a -5e-257)
t_2
(if (<= a 2.2e+50) t_1 (if (<= a 2.55e+211) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = -4.0 * ((t * a) + (x * i));
double tmp;
if (a <= -3.3e+81) {
tmp = t_3;
} else if (a <= -9e-156) {
tmp = t_2;
} else if (a <= -3e-238) {
tmp = t_1;
} else if (a <= -5e-257) {
tmp = t_2;
} else if (a <= 2.2e+50) {
tmp = t_1;
} else if (a <= 2.55e+211) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
t_2 = (b * c) - (27.0d0 * (j * k))
t_3 = (-4.0d0) * ((t * a) + (x * i))
if (a <= (-3.3d+81)) then
tmp = t_3
else if (a <= (-9d-156)) then
tmp = t_2
else if (a <= (-3d-238)) then
tmp = t_1
else if (a <= (-5d-257)) then
tmp = t_2
else if (a <= 2.2d+50) then
tmp = t_1
else if (a <= 2.55d+211) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = -4.0 * ((t * a) + (x * i));
double tmp;
if (a <= -3.3e+81) {
tmp = t_3;
} else if (a <= -9e-156) {
tmp = t_2;
} else if (a <= -3e-238) {
tmp = t_1;
} else if (a <= -5e-257) {
tmp = t_2;
} else if (a <= 2.2e+50) {
tmp = t_1;
} else if (a <= 2.55e+211) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) t_2 = (b * c) - (27.0 * (j * k)) t_3 = -4.0 * ((t * a) + (x * i)) tmp = 0 if a <= -3.3e+81: tmp = t_3 elif a <= -9e-156: tmp = t_2 elif a <= -3e-238: tmp = t_1 elif a <= -5e-257: tmp = t_2 elif a <= 2.2e+50: tmp = t_1 elif a <= 2.55e+211: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) t_2 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_3 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (a <= -3.3e+81) tmp = t_3; elseif (a <= -9e-156) tmp = t_2; elseif (a <= -3e-238) tmp = t_1; elseif (a <= -5e-257) tmp = t_2; elseif (a <= 2.2e+50) tmp = t_1; elseif (a <= 2.55e+211) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = x * ((18.0 * (t * (y * z))) - (4.0 * i)); t_2 = (b * c) - (27.0 * (j * k)); t_3 = -4.0 * ((t * a) + (x * i)); tmp = 0.0; if (a <= -3.3e+81) tmp = t_3; elseif (a <= -9e-156) tmp = t_2; elseif (a <= -3e-238) tmp = t_1; elseif (a <= -5e-257) tmp = t_2; elseif (a <= 2.2e+50) tmp = t_1; elseif (a <= 2.55e+211) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.3e+81], t$95$3, If[LessEqual[a, -9e-156], t$95$2, If[LessEqual[a, -3e-238], t$95$1, If[LessEqual[a, -5e-257], t$95$2, If[LessEqual[a, 2.2e+50], t$95$1, If[LessEqual[a, 2.55e+211], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_3 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;a \leq -3.3 \cdot 10^{+81}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -9 \cdot 10^{-156}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-238}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-257}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.55 \cdot 10^{+211}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -3.3e81 or 2.54999999999999981e211 < a Initial program 89.1%
Simplified84.9%
Taylor expanded in x around 0 89.0%
Taylor expanded in j around 0 81.2%
Taylor expanded in b around 0 77.6%
cancel-sign-sub-inv77.6%
*-commutative77.6%
metadata-eval77.6%
*-commutative77.6%
distribute-lft-out77.6%
*-commutative77.6%
Simplified77.6%
if -3.3e81 < a < -8.99999999999999971e-156 or -3e-238 < a < -4.99999999999999989e-257 or 2.20000000000000017e50 < a < 2.54999999999999981e211Initial program 87.1%
Simplified88.2%
Taylor expanded in i around 0 80.4%
Taylor expanded in t around 0 65.4%
if -8.99999999999999971e-156 < a < -3e-238 or -4.99999999999999989e-257 < a < 2.20000000000000017e50Initial program 89.0%
Simplified91.9%
Taylor expanded in x around inf 64.9%
Final simplification68.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 27.0 (* j k)))) (t_2 (* -4.0 (+ (* t a) (* x i)))))
(if (<= a -3.2e+81)
t_2
(if (<= a -1.05e-155)
t_1
(if (<= a -4e-238)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= a -2.8e-258)
t_1
(if (<= a 2.3e+50)
(* x (- (* z (* t (* 18.0 y))) (* 4.0 i)))
(if (<= a 1.45e+212) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = -4.0 * ((t * a) + (x * i));
double tmp;
if (a <= -3.2e+81) {
tmp = t_2;
} else if (a <= -1.05e-155) {
tmp = t_1;
} else if (a <= -4e-238) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (a <= -2.8e-258) {
tmp = t_1;
} else if (a <= 2.3e+50) {
tmp = x * ((z * (t * (18.0 * y))) - (4.0 * i));
} else if (a <= 1.45e+212) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (b * c) - (27.0d0 * (j * k))
t_2 = (-4.0d0) * ((t * a) + (x * i))
if (a <= (-3.2d+81)) then
tmp = t_2
else if (a <= (-1.05d-155)) then
tmp = t_1
else if (a <= (-4d-238)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (a <= (-2.8d-258)) then
tmp = t_1
else if (a <= 2.3d+50) then
tmp = x * ((z * (t * (18.0d0 * y))) - (4.0d0 * i))
else if (a <= 1.45d+212) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (27.0 * (j * k));
double t_2 = -4.0 * ((t * a) + (x * i));
double tmp;
if (a <= -3.2e+81) {
tmp = t_2;
} else if (a <= -1.05e-155) {
tmp = t_1;
} else if (a <= -4e-238) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (a <= -2.8e-258) {
tmp = t_1;
} else if (a <= 2.3e+50) {
tmp = x * ((z * (t * (18.0 * y))) - (4.0 * i));
} else if (a <= 1.45e+212) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (27.0 * (j * k)) t_2 = -4.0 * ((t * a) + (x * i)) tmp = 0 if a <= -3.2e+81: tmp = t_2 elif a <= -1.05e-155: tmp = t_1 elif a <= -4e-238: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif a <= -2.8e-258: tmp = t_1 elif a <= 2.3e+50: tmp = x * ((z * (t * (18.0 * y))) - (4.0 * i)) elif a <= 1.45e+212: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_2 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (a <= -3.2e+81) tmp = t_2; elseif (a <= -1.05e-155) tmp = t_1; elseif (a <= -4e-238) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (a <= -2.8e-258) tmp = t_1; elseif (a <= 2.3e+50) tmp = Float64(x * Float64(Float64(z * Float64(t * Float64(18.0 * y))) - Float64(4.0 * i))); elseif (a <= 1.45e+212) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (b * c) - (27.0 * (j * k)); t_2 = -4.0 * ((t * a) + (x * i)); tmp = 0.0; if (a <= -3.2e+81) tmp = t_2; elseif (a <= -1.05e-155) tmp = t_1; elseif (a <= -4e-238) tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)); elseif (a <= -2.8e-258) tmp = t_1; elseif (a <= 2.3e+50) tmp = x * ((z * (t * (18.0 * y))) - (4.0 * i)); elseif (a <= 1.45e+212) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.2e+81], t$95$2, If[LessEqual[a, -1.05e-155], t$95$1, If[LessEqual[a, -4e-238], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.8e-258], t$95$1, If[LessEqual[a, 2.3e+50], N[(x * N[(N[(z * N[(t * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+212], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_2 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;a \leq -3.2 \cdot 10^{+81}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-238}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-258}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+50}:\\
\;\;\;\;x \cdot \left(z \cdot \left(t \cdot \left(18 \cdot y\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+212}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -3.2e81 or 1.4499999999999999e212 < a Initial program 89.1%
Simplified84.9%
Taylor expanded in x around 0 89.0%
Taylor expanded in j around 0 81.2%
Taylor expanded in b around 0 77.6%
cancel-sign-sub-inv77.6%
*-commutative77.6%
metadata-eval77.6%
*-commutative77.6%
distribute-lft-out77.6%
*-commutative77.6%
Simplified77.6%
if -3.2e81 < a < -1.0500000000000001e-155 or -4e-238 < a < -2.8000000000000002e-258 or 2.29999999999999997e50 < a < 1.4499999999999999e212Initial program 87.1%
Simplified88.2%
Taylor expanded in i around 0 80.4%
Taylor expanded in t around 0 65.4%
if -1.0500000000000001e-155 < a < -4e-238Initial program 95.9%
Simplified99.9%
Taylor expanded in x around inf 75.2%
if -2.8000000000000002e-258 < a < 2.29999999999999997e50Initial program 86.7%
Simplified89.2%
Taylor expanded in x around inf 61.5%
pow161.5%
*-commutative61.5%
associate-*r*62.8%
*-commutative62.8%
*-commutative62.8%
Applied egg-rr62.8%
unpow162.8%
associate-*l*62.8%
*-commutative62.8%
associate-*l*62.8%
Simplified62.8%
Final simplification68.7%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.8e+28) (not (<= (* b c) 5.5e+15))) (- (+ (* b c) (* -4.0 (* t a))) (* 4.0 (* x i))) (+ (* j (* k -27.0)) (* -4.0 (+ (* t a) (* x i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.8e+28) || !((b * c) <= 5.5e+15)) {
tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.8d+28)) .or. (.not. ((b * c) <= 5.5d+15))) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (4.0d0 * (x * i))
else
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * ((t * a) + (x * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.8e+28) || !((b * c) <= 5.5e+15)) {
tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i));
} else {
tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.8e+28) or not ((b * c) <= 5.5e+15): tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i)) else: tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.8e+28) || !(Float64(b * c) <= 5.5e+15)) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (((b * c) <= -2.8e+28) || ~(((b * c) <= 5.5e+15))) tmp = ((b * c) + (-4.0 * (t * a))) - (4.0 * (x * i)); else tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.8e+28], N[Not[LessEqual[N[(b * c), $MachinePrecision], 5.5e+15]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.8 \cdot 10^{+28} \lor \neg \left(b \cdot c \leq 5.5 \cdot 10^{+15}\right):\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.8000000000000001e28 or 5.5e15 < (*.f64 b c) Initial program 85.7%
Simplified85.0%
Taylor expanded in x around 0 79.7%
Taylor expanded in j around 0 76.4%
if -2.8000000000000001e28 < (*.f64 b c) < 5.5e15Initial program 90.7%
Simplified92.1%
Taylor expanded in x around 0 79.2%
Taylor expanded in b around 0 77.7%
associate--r+77.7%
cancel-sign-sub-inv77.7%
cancel-sign-sub-inv77.7%
metadata-eval77.7%
distribute-lft-out77.7%
metadata-eval77.7%
*-commutative77.7%
associate-*l*77.7%
Simplified77.7%
Final simplification77.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2.6e+178)
(+ (* b c) (* 18.0 (* t (* x (* y z)))))
(if (<= (* b c) 3.1e+176)
(+ (* j (* k -27.0)) (* -4.0 (+ (* t a) (* x i))))
(- (* b c) (* 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 ((b * c) <= -2.6e+178) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else if ((b * c) <= 3.1e+176) {
tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i)));
} else {
tmp = (b * c) - (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 ((b * c) <= (-2.6d+178)) then
tmp = (b * c) + (18.0d0 * (t * (x * (y * z))))
else if ((b * c) <= 3.1d+176) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * ((t * a) + (x * i)))
else
tmp = (b * c) - (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 ((b * c) <= -2.6e+178) {
tmp = (b * c) + (18.0 * (t * (x * (y * z))));
} else if ((b * c) <= 3.1e+176) {
tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i)));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -2.6e+178: tmp = (b * c) + (18.0 * (t * (x * (y * z)))) elif (b * c) <= 3.1e+176: tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i))) else: tmp = (b * c) - (4.0 * (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2.6e+178) tmp = Float64(Float64(b * c) + Float64(18.0 * Float64(t * Float64(x * Float64(y * z))))); elseif (Float64(b * c) <= 3.1e+176) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))); else tmp = Float64(Float64(b * c) - 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 ((b * c) <= -2.6e+178) tmp = (b * c) + (18.0 * (t * (x * (y * z)))); elseif ((b * c) <= 3.1e+176) tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i))); else tmp = (b * c) - (4.0 * (x * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -2.6e+178], N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.1e+176], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.6 \cdot 10^{+178}:\\
\;\;\;\;b \cdot c + 18 \cdot \left(t \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 3.1 \cdot 10^{+176}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -2.6000000000000001e178Initial program 87.8%
Simplified84.8%
Taylor expanded in i around 0 81.8%
Taylor expanded in a around 0 76.0%
Taylor expanded in j around 0 75.4%
if -2.6000000000000001e178 < (*.f64 b c) < 3.0999999999999999e176Initial program 89.1%
Simplified90.2%
Taylor expanded in x around 0 79.8%
Taylor expanded in b around 0 74.0%
associate--r+74.0%
cancel-sign-sub-inv74.0%
cancel-sign-sub-inv74.0%
metadata-eval74.0%
distribute-lft-out74.0%
metadata-eval74.0%
*-commutative74.0%
associate-*l*74.0%
Simplified74.0%
if 3.0999999999999999e176 < (*.f64 b c) Initial program 84.8%
Simplified84.8%
Taylor expanded in x around 0 82.0%
Taylor expanded in j around 0 85.0%
Taylor expanded in a around 0 79.5%
Final simplification74.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -3.8e+134)
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(if (<= (* b c) 7.5e+15)
(+ (* j (* k -27.0)) (* -4.0 (+ (* t a) (* x i))))
(- (+ (* 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 ((b * c) <= -3.8e+134) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if ((b * c) <= 7.5e+15) {
tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i)));
} 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 ((b * c) <= (-3.8d+134)) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else if ((b * c) <= 7.5d+15) then
tmp = (j * (k * (-27.0d0))) + ((-4.0d0) * ((t * a) + (x * i)))
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 ((b * c) <= -3.8e+134) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else if ((b * c) <= 7.5e+15) {
tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i)));
} 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 (b * c) <= -3.8e+134: tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) elif (b * c) <= 7.5e+15: tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i))) 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(b * c) <= -3.8e+134) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); elseif (Float64(b * c) <= 7.5e+15) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i)))); else tmp = Float64(Float64(Float64(b * c) + 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 ((b * c) <= -3.8e+134) tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))); elseif ((b * c) <= 7.5e+15) tmp = (j * (k * -27.0)) + (-4.0 * ((t * a) + (x * i))); 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[LessEqual[N[(b * c), $MachinePrecision], -3.8e+134], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 7.5e+15], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.8 \cdot 10^{+134}:\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{elif}\;b \cdot c \leq 7.5 \cdot 10^{+15}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -3.79999999999999998e134Initial program 89.9%
Simplified87.4%
Taylor expanded in i around 0 84.0%
Taylor expanded in j around 0 77.6%
if -3.79999999999999998e134 < (*.f64 b c) < 7.5e15Initial program 89.8%
Simplified91.7%
Taylor expanded in x around 0 80.3%
Taylor expanded in b around 0 77.8%
associate--r+77.8%
cancel-sign-sub-inv77.8%
cancel-sign-sub-inv77.8%
metadata-eval77.8%
distribute-lft-out77.8%
metadata-eval77.8%
*-commutative77.8%
associate-*l*77.8%
Simplified77.8%
if 7.5e15 < (*.f64 b c) Initial program 83.6%
Simplified82.3%
Taylor expanded in x around 0 79.2%
Taylor expanded in j around 0 78.2%
Final simplification77.9%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= z 2.9e+192) (- (+ (* b c) (* -4.0 (* t a))) (+ (* x (* 4.0 i)) (* j (* 27.0 k)))) (* x (- (* z (* t (* 18.0 y))) (* 4.0 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 (z <= 2.9e+192) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((z * (t * (18.0 * y))) - (4.0 * 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 (z <= 2.9d+192) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = x * ((z * (t * (18.0d0 * y))) - (4.0d0 * 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 (z <= 2.9e+192) {
tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((z * (t * (18.0 * y))) - (4.0 * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if z <= 2.9e+192: tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * ((z * (t * (18.0 * y))) - (4.0 * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (z <= 2.9e+192) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(z * Float64(t * Float64(18.0 * y))) - Float64(4.0 * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (z <= 2.9e+192) tmp = ((b * c) + (-4.0 * (t * a))) - ((x * (4.0 * i)) + (j * (27.0 * k))); else tmp = x * ((z * (t * (18.0 * y))) - (4.0 * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[z, 2.9e+192], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z * N[(t * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.9 \cdot 10^{+192}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(z \cdot \left(t \cdot \left(18 \cdot y\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if z < 2.9000000000000001e192Initial program 89.1%
Simplified89.6%
Taylor expanded in x around 0 81.9%
if 2.9000000000000001e192 < z Initial program 79.1%
Simplified79.1%
Taylor expanded in x around inf 79.3%
pow179.3%
*-commutative79.3%
associate-*r*84.2%
*-commutative84.2%
*-commutative84.2%
Applied egg-rr84.2%
unpow184.2%
associate-*l*84.3%
*-commutative84.3%
associate-*l*84.3%
Simplified84.3%
Final simplification82.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (* b c) (* 4.0 (* x i))))
(t_2 (- (* b c) (* 27.0 (* j k))))
(t_3 (* -4.0 (+ (* t a) (* x i)))))
(if (<= a -5.1e+81)
t_3
(if (<= a -2e-155)
t_2
(if (<= a -1.35e-236)
t_1
(if (<= a -1.1e-259)
t_2
(if (<= a -1.15e-281)
(* 18.0 (* x (* z (* y t))))
(if (<= a 1.7e+164) t_1 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 = (b * c) - (4.0 * (x * i));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = -4.0 * ((t * a) + (x * i));
double tmp;
if (a <= -5.1e+81) {
tmp = t_3;
} else if (a <= -2e-155) {
tmp = t_2;
} else if (a <= -1.35e-236) {
tmp = t_1;
} else if (a <= -1.1e-259) {
tmp = t_2;
} else if (a <= -1.15e-281) {
tmp = 18.0 * (x * (z * (y * t)));
} else if (a <= 1.7e+164) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (b * c) - (4.0d0 * (x * i))
t_2 = (b * c) - (27.0d0 * (j * k))
t_3 = (-4.0d0) * ((t * a) + (x * i))
if (a <= (-5.1d+81)) then
tmp = t_3
else if (a <= (-2d-155)) then
tmp = t_2
else if (a <= (-1.35d-236)) then
tmp = t_1
else if (a <= (-1.1d-259)) then
tmp = t_2
else if (a <= (-1.15d-281)) then
tmp = 18.0d0 * (x * (z * (y * t)))
else if (a <= 1.7d+164) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) - (4.0 * (x * i));
double t_2 = (b * c) - (27.0 * (j * k));
double t_3 = -4.0 * ((t * a) + (x * i));
double tmp;
if (a <= -5.1e+81) {
tmp = t_3;
} else if (a <= -2e-155) {
tmp = t_2;
} else if (a <= -1.35e-236) {
tmp = t_1;
} else if (a <= -1.1e-259) {
tmp = t_2;
} else if (a <= -1.15e-281) {
tmp = 18.0 * (x * (z * (y * t)));
} else if (a <= 1.7e+164) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) - (4.0 * (x * i)) t_2 = (b * c) - (27.0 * (j * k)) t_3 = -4.0 * ((t * a) + (x * i)) tmp = 0 if a <= -5.1e+81: tmp = t_3 elif a <= -2e-155: tmp = t_2 elif a <= -1.35e-236: tmp = t_1 elif a <= -1.1e-259: tmp = t_2 elif a <= -1.15e-281: tmp = 18.0 * (x * (z * (y * t))) elif a <= 1.7e+164: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) t_2 = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))) t_3 = Float64(-4.0 * Float64(Float64(t * a) + Float64(x * i))) tmp = 0.0 if (a <= -5.1e+81) tmp = t_3; elseif (a <= -2e-155) tmp = t_2; elseif (a <= -1.35e-236) tmp = t_1; elseif (a <= -1.1e-259) tmp = t_2; elseif (a <= -1.15e-281) tmp = Float64(18.0 * Float64(x * Float64(z * Float64(y * t)))); elseif (a <= 1.7e+164) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (b * c) - (4.0 * (x * i)); t_2 = (b * c) - (27.0 * (j * k)); t_3 = -4.0 * ((t * a) + (x * i)); tmp = 0.0; if (a <= -5.1e+81) tmp = t_3; elseif (a <= -2e-155) tmp = t_2; elseif (a <= -1.35e-236) tmp = t_1; elseif (a <= -1.1e-259) tmp = t_2; elseif (a <= -1.15e-281) tmp = 18.0 * (x * (z * (y * t))); elseif (a <= 1.7e+164) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-4.0 * N[(N[(t * a), $MachinePrecision] + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.1e+81], t$95$3, If[LessEqual[a, -2e-155], t$95$2, If[LessEqual[a, -1.35e-236], t$95$1, If[LessEqual[a, -1.1e-259], t$95$2, If[LessEqual[a, -1.15e-281], N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+164], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c - 4 \cdot \left(x \cdot i\right)\\
t_2 := b \cdot c - 27 \cdot \left(j \cdot k\right)\\
t_3 := -4 \cdot \left(t \cdot a + x \cdot i\right)\\
\mathbf{if}\;a \leq -5.1 \cdot 10^{+81}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-155}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-236}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.1 \cdot 10^{-259}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-281}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+164}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -5.1000000000000003e81 or 1.7000000000000001e164 < a Initial program 89.2%
Simplified85.5%
Taylor expanded in x around 0 89.1%
Taylor expanded in j around 0 78.6%
Taylor expanded in b around 0 73.3%
cancel-sign-sub-inv73.3%
*-commutative73.3%
metadata-eval73.3%
*-commutative73.3%
distribute-lft-out73.3%
*-commutative73.3%
Simplified73.3%
if -5.1000000000000003e81 < a < -2.00000000000000003e-155 or -1.35e-236 < a < -1.10000000000000005e-259Initial program 86.5%
Simplified86.6%
Taylor expanded in i around 0 79.9%
Taylor expanded in t around 0 66.5%
if -2.00000000000000003e-155 < a < -1.35e-236 or -1.14999999999999994e-281 < a < 1.7000000000000001e164Initial program 89.0%
Simplified92.3%
Taylor expanded in x around 0 77.9%
Taylor expanded in j around 0 60.8%
Taylor expanded in a around 0 55.7%
if -1.10000000000000005e-259 < a < -1.14999999999999994e-281Initial program 83.1%
Simplified83.3%
Taylor expanded in y around inf 67.7%
*-commutative67.7%
associate-*l*67.5%
*-commutative67.5%
associate-*l*67.7%
Simplified67.7%
Final simplification63.6%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -5.4e+174) (* b c) (if (<= (* b c) 5.5e+15) (* -27.0 (* j k)) (* b c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5.4e+174) {
tmp = b * c;
} else if ((b * c) <= 5.5e+15) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5.4d+174)) then
tmp = b * c
else if ((b * c) <= 5.5d+15) then
tmp = (-27.0d0) * (j * k)
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5.4e+174) {
tmp = b * c;
} else if ((b * c) <= 5.5e+15) {
tmp = -27.0 * (j * k);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5.4e+174: tmp = b * c elif (b * c) <= 5.5e+15: tmp = -27.0 * (j * k) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5.4e+174) tmp = Float64(b * c); elseif (Float64(b * c) <= 5.5e+15) tmp = Float64(-27.0 * Float64(j * k)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b * c) <= -5.4e+174) tmp = b * c; elseif ((b * c) <= 5.5e+15) tmp = -27.0 * (j * k); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5.4e+174], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 5.5e+15], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5.4 \cdot 10^{+174}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 5.5 \cdot 10^{+15}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -5.3999999999999998e174 or 5.5e15 < (*.f64 b c) Initial program 85.1%
Simplified83.2%
Taylor expanded in b around inf 52.9%
if -5.3999999999999998e174 < (*.f64 b c) < 5.5e15Initial program 90.3%
Simplified92.1%
Taylor expanded in j around inf 31.9%
Final simplification39.6%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -1.5e+180) (* b c) (if (<= (* b c) 3e+15) (* j (* k -27.0)) (* b c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.5e+180) {
tmp = b * c;
} else if ((b * c) <= 3e+15) {
tmp = j * (k * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.5d+180)) then
tmp = b * c
else if ((b * c) <= 3d+15) then
tmp = j * (k * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.5e+180) {
tmp = b * c;
} else if ((b * c) <= 3e+15) {
tmp = j * (k * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.5e+180: tmp = b * c elif (b * c) <= 3e+15: tmp = j * (k * -27.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) <= -1.5e+180) tmp = Float64(b * c); elseif (Float64(b * c) <= 3e+15) tmp = Float64(j * Float64(k * -27.0)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b * c) <= -1.5e+180) tmp = b * c; elseif ((b * c) <= 3e+15) tmp = j * (k * -27.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], -1.5e+180], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3e+15], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.5 \cdot 10^{+180}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{+15}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.50000000000000001e180 or 3e15 < (*.f64 b c) Initial program 85.1%
Simplified83.2%
Taylor expanded in b around inf 52.9%
if -1.50000000000000001e180 < (*.f64 b c) < 3e15Initial program 90.3%
Simplified92.1%
Taylor expanded in j around inf 31.9%
*-commutative31.9%
associate-*l*31.9%
Simplified31.9%
Final simplification39.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 88.4%
Simplified88.8%
Taylor expanded in b around inf 22.4%
Final simplification22.4%
(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 2023283
(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)))