
(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 22 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 (* (* j 27.0) k))
(t_2 (* 18.0 (* t (* y z))))
(t_3
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))))
(if (<= t_3 (- INFINITY))
(-
(* x (- (+ t_2 (/ (* b c) x)) (+ (* 4.0 i) (* 4.0 (/ (* t a) x)))))
t_1)
(if (<= t_3 2e+307)
(- t_3 t_1)
(if (<= t_3 INFINITY)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i)))
(* x (- t_2 (* 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 = (j * 27.0) * k;
double t_2 = 18.0 * (t * (y * z));
double t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = (x * ((t_2 + ((b * c) / x)) - ((4.0 * i) + (4.0 * ((t * a) / x))))) - t_1;
} else if (t_3 <= 2e+307) {
tmp = t_3 - t_1;
} else if (t_3 <= ((double) INFINITY)) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = x * (t_2 - (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 = (j * 27.0) * k;
double t_2 = 18.0 * (t * (y * z));
double t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = (x * ((t_2 + ((b * c) / x)) - ((4.0 * i) + (4.0 * ((t * a) / x))))) - t_1;
} else if (t_3 <= 2e+307) {
tmp = t_3 - t_1;
} else if (t_3 <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = x * (t_2 - (4.0 * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = 18.0 * (t * (y * z)) t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i) tmp = 0 if t_3 <= -math.inf: tmp = (x * ((t_2 + ((b * c) / x)) - ((4.0 * i) + (4.0 * ((t * a) / x))))) - t_1 elif t_3 <= 2e+307: tmp = t_3 - t_1 elif t_3 <= math.inf: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = x * (t_2 - (4.0 * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(18.0 * Float64(t * Float64(y * z))) t_3 = 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)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(Float64(x * Float64(Float64(t_2 + Float64(Float64(b * c) / x)) - Float64(Float64(4.0 * i) + Float64(4.0 * Float64(Float64(t * a) / x))))) - t_1); elseif (t_3 <= 2e+307) tmp = Float64(t_3 - t_1); elseif (t_3 <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(x * Float64(t_2 - Float64(4.0 * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; t_2 = 18.0 * (t * (y * z)); t_3 = ((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i); tmp = 0.0; if (t_3 <= -Inf) tmp = (x * ((t_2 + ((b * c) / x)) - ((4.0 * i) + (4.0 * ((t * a) / x))))) - t_1; elseif (t_3 <= 2e+307) tmp = t_3 - t_1; elseif (t_3 <= Inf) tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)); else tmp = x * (t_2 - (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[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = 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]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(x * N[(N[(t$95$2 + N[(N[(b * c), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(N[(4.0 * i), $MachinePrecision] + N[(4.0 * N[(N[(t * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$3, 2e+307], N[(t$95$3 - t$95$1), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t$95$2 - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := 18 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
t_3 := \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\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;x \cdot \left(\left(t\_2 + \frac{b \cdot c}{x}\right) - \left(4 \cdot i + 4 \cdot \frac{t \cdot a}{x}\right)\right) - t\_1\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t\_3 - t\_1\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t\_2 - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < -inf.0Initial program 80.5%
Taylor expanded in x around inf 92.0%
if -inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < 1.99999999999999997e307Initial program 99.0%
if 1.99999999999999997e307 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) < +inf.0Initial program 81.7%
Simplified86.4%
Taylor expanded in j around 0 93.3%
if +inf.0 < (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) Initial program 0.0%
Simplified21.1%
Taylor expanded in x around inf 84.2%
Final simplification95.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (- (* 18.0 (* 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 <= ((double) INFINITY)) {
tmp = t_1;
} 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 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} 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 <= math.inf: tmp = t_1 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 <= Inf) tmp = t_1; 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 <= Inf) tmp = t_1; 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, Infinity], t$95$1, 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 \infty:\\
\;\;\;\;t\_1\\
\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 #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 94.5%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Simplified14.3%
Taylor expanded in x around inf 64.6%
Final simplification91.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -2e+169)
(- (* b c) (* 27.0 (* j k)))
(if (<= t_1 2e+62)
(-
(+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0))))
(* 4.0 (* x i)))
(+ (* 18.0 (* (* y z) (* x t))) (* j (* k -27.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+169) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t_1 <= 2e+62) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (j * 27.0d0) * k
if (t_1 <= (-2d+169)) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (t_1 <= 2d+62) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = (18.0d0 * ((y * z) * (x * t))) + (j * (k * (-27.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+169) {
tmp = (b * c) - (27.0 * (j * k));
} else if (t_1 <= 2e+62) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k tmp = 0 if t_1 <= -2e+169: tmp = (b * c) - (27.0 * (j * k)) elif t_1 <= 2e+62: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -2e+169) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (t_1 <= 2e+62) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))) - Float64(4.0 * Float64(x * i))); else tmp = Float64(Float64(18.0 * Float64(Float64(y * z) * Float64(x * t))) + Float64(j * Float64(k * -27.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; tmp = 0.0; if (t_1 <= -2e+169) tmp = (b * c) - (27.0 * (j * k)); elseif (t_1 <= 2e+62) tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)); else tmp = (18.0 * ((y * z) * (x * t))) + (j * (k * -27.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+169], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+62], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(18.0 * N[(N[(y * z), $MachinePrecision] * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+169}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+62}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\right) - 4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;18 \cdot \left(\left(y \cdot z\right) \cdot \left(x \cdot t\right)\right) + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -1.99999999999999987e169Initial program 66.7%
Taylor expanded in t around 0 77.3%
Taylor expanded in i around 0 80.8%
if -1.99999999999999987e169 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000007e62Initial program 89.9%
Simplified91.8%
Taylor expanded in j around 0 85.5%
if 2.00000000000000007e62 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 65.8%
Simplified65.9%
Taylor expanded in y around inf 69.4%
associate-*r*69.3%
Simplified69.3%
Final simplification82.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -1.02e+48)
(+ (* b c) t_1)
(if (<= (* b c) 6e-255)
(+ t_1 (* i (* x -4.0)))
(if (<= (* b c) 8.2e-184)
(* t (* 18.0 (* x (* y z))))
(if (<= (* b c) 4.6e+78)
(- (* (* t a) -4.0) (* (* j 27.0) k))
(- (* 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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.02e+48) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 6e-255) {
tmp = t_1 + (i * (x * -4.0));
} else if ((b * c) <= 8.2e-184) {
tmp = t * (18.0 * (x * (y * z)));
} else if ((b * c) <= 4.6e+78) {
tmp = ((t * a) * -4.0) - ((j * 27.0) * k);
} 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 = j * (k * (-27.0d0))
if ((b * c) <= (-1.02d+48)) then
tmp = (b * c) + t_1
else if ((b * c) <= 6d-255) then
tmp = t_1 + (i * (x * (-4.0d0)))
else if ((b * c) <= 8.2d-184) then
tmp = t * (18.0d0 * (x * (y * z)))
else if ((b * c) <= 4.6d+78) then
tmp = ((t * a) * (-4.0d0)) - ((j * 27.0d0) * k)
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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -1.02e+48) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 6e-255) {
tmp = t_1 + (i * (x * -4.0));
} else if ((b * c) <= 8.2e-184) {
tmp = t * (18.0 * (x * (y * z)));
} else if ((b * c) <= 4.6e+78) {
tmp = ((t * a) * -4.0) - ((j * 27.0) * k);
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -1.02e+48: tmp = (b * c) + t_1 elif (b * c) <= 6e-255: tmp = t_1 + (i * (x * -4.0)) elif (b * c) <= 8.2e-184: tmp = t * (18.0 * (x * (y * z))) elif (b * c) <= 4.6e+78: tmp = ((t * a) * -4.0) - ((j * 27.0) * k) 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(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -1.02e+48) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= 6e-255) tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); elseif (Float64(b * c) <= 8.2e-184) tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); elseif (Float64(b * c) <= 4.6e+78) tmp = Float64(Float64(Float64(t * a) * -4.0) - Float64(Float64(j * 27.0) * k)); 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 = j * (k * -27.0); tmp = 0.0; if ((b * c) <= -1.02e+48) tmp = (b * c) + t_1; elseif ((b * c) <= 6e-255) tmp = t_1 + (i * (x * -4.0)); elseif ((b * c) <= 8.2e-184) tmp = t * (18.0 * (x * (y * z))); elseif ((b * c) <= 4.6e+78) tmp = ((t * a) * -4.0) - ((j * 27.0) * k); 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.02e+48], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6e-255], N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-184], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.6e+78], N[(N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -1.02 \cdot 10^{+48}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq 6 \cdot 10^{-255}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-184}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 4.6 \cdot 10^{+78}:\\
\;\;\;\;\left(t \cdot a\right) \cdot -4 - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.02e48Initial program 77.3%
Simplified84.9%
Taylor expanded in b around inf 66.8%
if -1.02e48 < (*.f64 b c) < 6.00000000000000004e-255Initial program 88.3%
Simplified90.1%
Taylor expanded in i around inf 59.1%
metadata-eval59.1%
distribute-lft-neg-in59.1%
*-commutative59.1%
associate-*r*59.1%
distribute-rgt-neg-in59.1%
distribute-rgt-neg-in59.1%
metadata-eval59.1%
*-commutative59.1%
Simplified59.1%
if 6.00000000000000004e-255 < (*.f64 b c) < 8.2e-184Initial program 89.7%
Simplified80.3%
Taylor expanded in t around inf 90.4%
Taylor expanded in x around inf 80.6%
if 8.2e-184 < (*.f64 b c) < 4.6000000000000004e78Initial program 80.9%
Taylor expanded in x around inf 88.0%
Taylor expanded in a around inf 62.1%
if 4.6000000000000004e78 < (*.f64 b c) Initial program 83.8%
Taylor expanded in t around 0 63.8%
Taylor expanded in j around 0 66.5%
Final simplification63.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= (* b c) -8.5e+49)
(+ (* b c) t_1)
(if (<= (* b c) 1.7e-259)
(+ t_1 (* i (* x -4.0)))
(if (<= (* b c) 2.3e-183)
(* t (* 18.0 (* x (* y z))))
(if (<= (* b c) 1.2e+71)
(+ t_1 (* a (* t -4.0)))
(- (* 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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -8.5e+49) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 1.7e-259) {
tmp = t_1 + (i * (x * -4.0));
} else if ((b * c) <= 2.3e-183) {
tmp = t * (18.0 * (x * (y * z)));
} else if ((b * c) <= 1.2e+71) {
tmp = t_1 + (a * (t * -4.0));
} 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 = j * (k * (-27.0d0))
if ((b * c) <= (-8.5d+49)) then
tmp = (b * c) + t_1
else if ((b * c) <= 1.7d-259) then
tmp = t_1 + (i * (x * (-4.0d0)))
else if ((b * c) <= 2.3d-183) then
tmp = t * (18.0d0 * (x * (y * z)))
else if ((b * c) <= 1.2d+71) then
tmp = t_1 + (a * (t * (-4.0d0)))
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 = j * (k * -27.0);
double tmp;
if ((b * c) <= -8.5e+49) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 1.7e-259) {
tmp = t_1 + (i * (x * -4.0));
} else if ((b * c) <= 2.3e-183) {
tmp = t * (18.0 * (x * (y * z)));
} else if ((b * c) <= 1.2e+71) {
tmp = t_1 + (a * (t * -4.0));
} else {
tmp = (b * c) - (4.0 * (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) tmp = 0 if (b * c) <= -8.5e+49: tmp = (b * c) + t_1 elif (b * c) <= 1.7e-259: tmp = t_1 + (i * (x * -4.0)) elif (b * c) <= 2.3e-183: tmp = t * (18.0 * (x * (y * z))) elif (b * c) <= 1.2e+71: tmp = t_1 + (a * (t * -4.0)) 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(j * Float64(k * -27.0)) tmp = 0.0 if (Float64(b * c) <= -8.5e+49) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= 1.7e-259) tmp = Float64(t_1 + Float64(i * Float64(x * -4.0))); elseif (Float64(b * c) <= 2.3e-183) tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); elseif (Float64(b * c) <= 1.2e+71) tmp = Float64(t_1 + Float64(a * Float64(t * -4.0))); 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 = j * (k * -27.0); tmp = 0.0; if ((b * c) <= -8.5e+49) tmp = (b * c) + t_1; elseif ((b * c) <= 1.7e-259) tmp = t_1 + (i * (x * -4.0)); elseif ((b * c) <= 2.3e-183) tmp = t * (18.0 * (x * (y * z))); elseif ((b * c) <= 1.2e+71) tmp = t_1 + (a * (t * -4.0)); 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -8.5e+49], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.7e-259], N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.3e-183], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.2e+71], N[(t$95$1 + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;b \cdot c \leq -8.5 \cdot 10^{+49}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.7 \cdot 10^{-259}:\\
\;\;\;\;t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{-183}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 1.2 \cdot 10^{+71}:\\
\;\;\;\;t\_1 + a \cdot \left(t \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -8.4999999999999996e49Initial program 77.3%
Simplified84.9%
Taylor expanded in b around inf 66.8%
if -8.4999999999999996e49 < (*.f64 b c) < 1.70000000000000006e-259Initial program 88.3%
Simplified90.1%
Taylor expanded in i around inf 59.1%
metadata-eval59.1%
distribute-lft-neg-in59.1%
*-commutative59.1%
associate-*r*59.1%
distribute-rgt-neg-in59.1%
distribute-rgt-neg-in59.1%
metadata-eval59.1%
*-commutative59.1%
Simplified59.1%
if 1.70000000000000006e-259 < (*.f64 b c) < 2.30000000000000016e-183Initial program 89.7%
Simplified80.3%
Taylor expanded in t around inf 90.4%
Taylor expanded in x around inf 80.6%
if 2.30000000000000016e-183 < (*.f64 b c) < 1.1999999999999999e71Initial program 80.4%
Simplified92.5%
Taylor expanded in a around inf 61.2%
metadata-eval61.2%
distribute-lft-neg-in61.2%
*-commutative61.2%
associate-*l*61.2%
distribute-lft-neg-in61.2%
distribute-lft-neg-in61.2%
metadata-eval61.2%
Simplified61.2%
if 1.1999999999999999e71 < (*.f64 b c) Initial program 84.2%
Taylor expanded in t around 0 64.6%
Taylor expanded in j around 0 65.1%
Final simplification62.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ t_1 (* i (* x -4.0)))))
(if (<= (* b c) -2e+45)
(+ (* b c) t_1)
(if (<= (* b c) 1.6e-255)
t_2
(if (<= (* b c) 1.95e-140)
(* 18.0 (* (* z t) (* x y)))
(if (<= (* b c) 2.35e+83) t_2 (+ (* b c) (* (* t a) -4.0))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (i * (x * -4.0));
double tmp;
if ((b * c) <= -2e+45) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 1.6e-255) {
tmp = t_2;
} else if ((b * c) <= 1.95e-140) {
tmp = 18.0 * ((z * t) * (x * y));
} else if ((b * c) <= 2.35e+83) {
tmp = t_2;
} else {
tmp = (b * c) + ((t * a) * -4.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t_1 + (i * (x * (-4.0d0)))
if ((b * c) <= (-2d+45)) then
tmp = (b * c) + t_1
else if ((b * c) <= 1.6d-255) then
tmp = t_2
else if ((b * c) <= 1.95d-140) then
tmp = 18.0d0 * ((z * t) * (x * y))
else if ((b * c) <= 2.35d+83) then
tmp = t_2
else
tmp = (b * c) + ((t * a) * (-4.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t_1 + (i * (x * -4.0));
double tmp;
if ((b * c) <= -2e+45) {
tmp = (b * c) + t_1;
} else if ((b * c) <= 1.6e-255) {
tmp = t_2;
} else if ((b * c) <= 1.95e-140) {
tmp = 18.0 * ((z * t) * (x * y));
} else if ((b * c) <= 2.35e+83) {
tmp = t_2;
} else {
tmp = (b * c) + ((t * a) * -4.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t_1 + (i * (x * -4.0)) tmp = 0 if (b * c) <= -2e+45: tmp = (b * c) + t_1 elif (b * c) <= 1.6e-255: tmp = t_2 elif (b * c) <= 1.95e-140: tmp = 18.0 * ((z * t) * (x * y)) elif (b * c) <= 2.35e+83: tmp = t_2 else: tmp = (b * c) + ((t * a) * -4.0) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(t_1 + Float64(i * Float64(x * -4.0))) tmp = 0.0 if (Float64(b * c) <= -2e+45) tmp = Float64(Float64(b * c) + t_1); elseif (Float64(b * c) <= 1.6e-255) tmp = t_2; elseif (Float64(b * c) <= 1.95e-140) tmp = Float64(18.0 * Float64(Float64(z * t) * Float64(x * y))); elseif (Float64(b * c) <= 2.35e+83) tmp = t_2; else tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = j * (k * -27.0); t_2 = t_1 + (i * (x * -4.0)); tmp = 0.0; if ((b * c) <= -2e+45) tmp = (b * c) + t_1; elseif ((b * c) <= 1.6e-255) tmp = t_2; elseif ((b * c) <= 1.95e-140) tmp = 18.0 * ((z * t) * (x * y)); elseif ((b * c) <= 2.35e+83) tmp = t_2; else tmp = (b * c) + ((t * a) * -4.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+45], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.6e-255], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.95e-140], N[(18.0 * N[(N[(z * t), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.35e+83], t$95$2, N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t\_1 + i \cdot \left(x \cdot -4\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+45}:\\
\;\;\;\;b \cdot c + t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{-255}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.95 \cdot 10^{-140}:\\
\;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2.35 \cdot 10^{+83}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\end{array}
\end{array}
if (*.f64 b c) < -1.9999999999999999e45Initial program 77.3%
Simplified84.9%
Taylor expanded in b around inf 66.8%
if -1.9999999999999999e45 < (*.f64 b c) < 1.59999999999999996e-255 or 1.9500000000000001e-140 < (*.f64 b c) < 2.3499999999999999e83Initial program 87.2%
Simplified90.6%
Taylor expanded in i around inf 57.9%
metadata-eval57.9%
distribute-lft-neg-in57.9%
*-commutative57.9%
associate-*r*57.9%
distribute-rgt-neg-in57.9%
distribute-rgt-neg-in57.9%
metadata-eval57.9%
*-commutative57.9%
Simplified57.9%
if 1.59999999999999996e-255 < (*.f64 b c) < 1.9500000000000001e-140Initial program 82.2%
Simplified82.5%
Taylor expanded in t around inf 88.5%
Taylor expanded in x around inf 53.9%
associate-*r*59.5%
*-commutative59.5%
associate-*r*65.1%
Simplified65.1%
if 2.3499999999999999e83 < (*.f64 b c) Initial program 83.0%
Simplified83.0%
Taylor expanded in j around 0 87.9%
Taylor expanded in x around 0 65.5%
Final simplification61.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (* y z))) (t_2 (* 4.0 (* x i))) (t_3 (* (* j 27.0) k)))
(if (<= x -3.3e+68)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(if (<= x -3.4e-144)
(- (- (+ (* b c) (* 18.0 (* t t_1))) t_2) t_3)
(if (<= x 3.5e-142)
(- (- (* b c) (* 4.0 (* t a))) t_3)
(- (+ (* b c) (* t (- (* 18.0 t_1) (* a 4.0)))) 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 = x * (y * z);
double t_2 = 4.0 * (x * i);
double t_3 = (j * 27.0) * k;
double tmp;
if (x <= -3.3e+68) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -3.4e-144) {
tmp = (((b * c) + (18.0 * (t * t_1))) - t_2) - t_3;
} else if (x <= 3.5e-142) {
tmp = ((b * c) - (4.0 * (t * a))) - t_3;
} else {
tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x * (y * z)
t_2 = 4.0d0 * (x * i)
t_3 = (j * 27.0d0) * k
if (x <= (-3.3d+68)) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else if (x <= (-3.4d-144)) then
tmp = (((b * c) + (18.0d0 * (t * t_1))) - t_2) - t_3
else if (x <= 3.5d-142) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_3
else
tmp = ((b * c) + (t * ((18.0d0 * t_1) - (a * 4.0d0)))) - 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 = x * (y * z);
double t_2 = 4.0 * (x * i);
double t_3 = (j * 27.0) * k;
double tmp;
if (x <= -3.3e+68) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else if (x <= -3.4e-144) {
tmp = (((b * c) + (18.0 * (t * t_1))) - t_2) - t_3;
} else if (x <= 3.5e-142) {
tmp = ((b * c) - (4.0 * (t * a))) - t_3;
} else {
tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * (y * z) t_2 = 4.0 * (x * i) t_3 = (j * 27.0) * k tmp = 0 if x <= -3.3e+68: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) elif x <= -3.4e-144: tmp = (((b * c) + (18.0 * (t * t_1))) - t_2) - t_3 elif x <= 3.5e-142: tmp = ((b * c) - (4.0 * (t * a))) - t_3 else: tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(y * z)) t_2 = Float64(4.0 * Float64(x * i)) t_3 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (x <= -3.3e+68) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); elseif (x <= -3.4e-144) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(t * t_1))) - t_2) - t_3); elseif (x <= 3.5e-142) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_3); else tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * t_1) - Float64(a * 4.0)))) - t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = x * (y * z); t_2 = 4.0 * (x * i); t_3 = (j * 27.0) * k; tmp = 0.0; if (x <= -3.3e+68) tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)); elseif (x <= -3.4e-144) tmp = (((b * c) + (18.0 * (t * t_1))) - t_2) - t_3; elseif (x <= 3.5e-142) tmp = ((b * c) - (4.0 * (t * a))) - t_3; else tmp = ((b * c) + (t * ((18.0 * t_1) - (a * 4.0)))) - t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[x, -3.3e+68], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.4e-144], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision] - t$95$3), $MachinePrecision], If[LessEqual[x, 3.5e-142], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$3), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * t$95$1), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
t_2 := 4 \cdot \left(x \cdot i\right)\\
t_3 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+68}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-144}:\\
\;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(t \cdot t\_1\right)\right) - t\_2\right) - t\_3\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{-142}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_3\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot t\_1 - a \cdot 4\right)\right) - t\_2\\
\end{array}
\end{array}
if x < -3.3e68Initial program 68.0%
Simplified74.9%
Taylor expanded in x around inf 78.8%
if -3.3e68 < x < -3.40000000000000017e-144Initial program 95.9%
Taylor expanded in a around 0 90.0%
if -3.40000000000000017e-144 < x < 3.50000000000000015e-142Initial program 96.4%
Taylor expanded in x around 0 88.7%
if 3.50000000000000015e-142 < x Initial program 79.6%
Simplified87.1%
Taylor expanded in j around 0 83.9%
Final simplification85.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= z 5.5e+235)
(-
(+ (* 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 tmp;
if (z <= 5.5e+235) {
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;
}
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 <= 5.5d+235) then
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
else
tmp = x * ((18.0d0 * (t * (y * z))) - (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 <= 5.5e+235) {
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): tmp = 0 if z <= 5.5e+235: 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) tmp = 0.0 if (z <= 5.5e+235) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(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) tmp = 0.0; if (z <= 5.5e+235) 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_] := If[LessEqual[z, 5.5e+235], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5.5 \cdot 10^{+235}:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if z < 5.49999999999999945e235Initial program 84.7%
Simplified87.5%
if 5.49999999999999945e235 < z Initial program 75.5%
Simplified64.4%
Taylor expanded in x around inf 76.5%
Final simplification86.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))))
(if (<= x -6.2e+278)
(+ (* j (* k -27.0)) (* i (* x -4.0)))
(if (<= x -1.55e+222)
t_1
(if (<= x -1.52e-43)
(- (* b c) (* 4.0 (* x i)))
(if (<= x 2e-59) (- (* b c) (* 27.0 (* j k))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (x <= -6.2e+278) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else if (x <= -1.55e+222) {
tmp = t_1;
} else if (x <= -1.52e-43) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= 2e-59) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0))
if (x <= (-6.2d+278)) then
tmp = (j * (k * (-27.0d0))) + (i * (x * (-4.0d0)))
else if (x <= (-1.55d+222)) then
tmp = t_1
else if (x <= (-1.52d-43)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= 2d-59) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0));
double tmp;
if (x <= -6.2e+278) {
tmp = (j * (k * -27.0)) + (i * (x * -4.0));
} else if (x <= -1.55e+222) {
tmp = t_1;
} else if (x <= -1.52e-43) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= 2e-59) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)) tmp = 0 if x <= -6.2e+278: tmp = (j * (k * -27.0)) + (i * (x * -4.0)) elif x <= -1.55e+222: tmp = t_1 elif x <= -1.52e-43: tmp = (b * c) - (4.0 * (x * i)) elif x <= 2e-59: tmp = (b * c) - (27.0 * (j * k)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0))) tmp = 0.0 if (x <= -6.2e+278) tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(i * Float64(x * -4.0))); elseif (x <= -1.55e+222) tmp = t_1; elseif (x <= -1.52e-43) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= 2e-59) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * ((18.0 * (x * (y * z))) - (a * 4.0)); tmp = 0.0; if (x <= -6.2e+278) tmp = (j * (k * -27.0)) + (i * (x * -4.0)); elseif (x <= -1.55e+222) tmp = t_1; elseif (x <= -1.52e-43) tmp = (b * c) - (4.0 * (x * i)); elseif (x <= 2e-59) tmp = (b * c) - (27.0 * (j * k)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.2e+278], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.55e+222], t$95$1, If[LessEqual[x, -1.52e-43], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e-59], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+278}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + i \cdot \left(x \cdot -4\right)\\
\mathbf{elif}\;x \leq -1.55 \cdot 10^{+222}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.52 \cdot 10^{-43}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-59}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.19999999999999943e278Initial program 80.9%
Simplified80.9%
Taylor expanded in i around inf 81.3%
metadata-eval81.3%
distribute-lft-neg-in81.3%
*-commutative81.3%
associate-*r*90.7%
distribute-rgt-neg-in90.7%
distribute-rgt-neg-in90.7%
metadata-eval90.7%
*-commutative90.7%
Simplified90.7%
if -6.19999999999999943e278 < x < -1.5499999999999999e222 or 2.0000000000000001e-59 < x Initial program 74.2%
Simplified83.4%
Taylor expanded in t around inf 64.4%
if -1.5499999999999999e222 < x < -1.52e-43Initial program 79.9%
Taylor expanded in t around 0 67.4%
Taylor expanded in j around 0 59.1%
if -1.52e-43 < x < 2.0000000000000001e-59Initial program 94.3%
Taylor expanded in t around 0 71.2%
Taylor expanded in i around 0 64.0%
Final simplification64.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -4.8e+35)
(* b c)
(if (<= (* b c) -4.2e-256)
(* x (* i -4.0))
(if (<= (* b c) 6.5e-68)
(* 18.0 (* (* z t) (* x y)))
(if (<= (* b c) 8.2e+74) (* k (* j -27.0)) (* b c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4.8e+35) {
tmp = b * c;
} else if ((b * c) <= -4.2e-256) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 6.5e-68) {
tmp = 18.0 * ((z * t) * (x * y));
} else if ((b * c) <= 8.2e+74) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-4.8d+35)) then
tmp = b * c
else if ((b * c) <= (-4.2d-256)) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= 6.5d-68) then
tmp = 18.0d0 * ((z * t) * (x * y))
else if ((b * c) <= 8.2d+74) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4.8e+35) {
tmp = b * c;
} else if ((b * c) <= -4.2e-256) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 6.5e-68) {
tmp = 18.0 * ((z * t) * (x * y));
} else if ((b * c) <= 8.2e+74) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -4.8e+35: tmp = b * c elif (b * c) <= -4.2e-256: tmp = x * (i * -4.0) elif (b * c) <= 6.5e-68: tmp = 18.0 * ((z * t) * (x * y)) elif (b * c) <= 8.2e+74: tmp = k * (j * -27.0) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -4.8e+35) tmp = Float64(b * c); elseif (Float64(b * c) <= -4.2e-256) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= 6.5e-68) tmp = Float64(18.0 * Float64(Float64(z * t) * Float64(x * y))); elseif (Float64(b * c) <= 8.2e+74) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b * c) <= -4.8e+35) tmp = b * c; elseif ((b * c) <= -4.2e-256) tmp = x * (i * -4.0); elseif ((b * c) <= 6.5e-68) tmp = 18.0 * ((z * t) * (x * y)); elseif ((b * c) <= 8.2e+74) tmp = k * (j * -27.0); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -4.8e+35], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -4.2e-256], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.5e-68], N[(18.0 * N[(N[(z * t), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 8.2e+74], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.8 \cdot 10^{+35}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -4.2 \cdot 10^{-256}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 6.5 \cdot 10^{-68}:\\
\;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{+74}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -4.80000000000000029e35 or 8.2000000000000001e74 < (*.f64 b c) Initial program 80.6%
Simplified85.8%
Taylor expanded in b around inf 61.5%
Taylor expanded in b around inf 54.8%
if -4.80000000000000029e35 < (*.f64 b c) < -4.20000000000000005e-256Initial program 86.6%
Simplified92.2%
Taylor expanded in x around inf 62.8%
Taylor expanded in t around 0 45.3%
if -4.20000000000000005e-256 < (*.f64 b c) < 6.4999999999999997e-68Initial program 85.0%
Simplified86.5%
Taylor expanded in t around inf 56.1%
Taylor expanded in x around inf 35.9%
associate-*r*36.1%
*-commutative36.1%
associate-*r*36.2%
Simplified36.2%
if 6.4999999999999997e-68 < (*.f64 b c) < 8.2000000000000001e74Initial program 90.9%
Simplified95.2%
Taylor expanded in j around inf 48.6%
associate-*r*48.8%
*-commutative48.8%
metadata-eval48.8%
distribute-rgt-neg-in48.8%
*-commutative48.8%
distribute-rgt-neg-in48.8%
metadata-eval48.8%
*-commutative48.8%
Simplified48.8%
Final simplification46.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -4.6e+34)
(* b c)
(if (<= (* b c) 3.9e-262)
(* x (* i -4.0))
(if (<= (* b c) 4800.0)
(* t (* a -4.0))
(if (<= (* b c) 2.12e+77) (* k (* j -27.0)) (* b c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4.6e+34) {
tmp = b * c;
} else if ((b * c) <= 3.9e-262) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 4800.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 2.12e+77) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-4.6d+34)) then
tmp = b * c
else if ((b * c) <= 3.9d-262) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= 4800.0d0) then
tmp = t * (a * (-4.0d0))
else if ((b * c) <= 2.12d+77) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -4.6e+34) {
tmp = b * c;
} else if ((b * c) <= 3.9e-262) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 4800.0) {
tmp = t * (a * -4.0);
} else if ((b * c) <= 2.12e+77) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -4.6e+34: tmp = b * c elif (b * c) <= 3.9e-262: tmp = x * (i * -4.0) elif (b * c) <= 4800.0: tmp = t * (a * -4.0) elif (b * c) <= 2.12e+77: tmp = k * (j * -27.0) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -4.6e+34) tmp = Float64(b * c); elseif (Float64(b * c) <= 3.9e-262) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= 4800.0) tmp = Float64(t * Float64(a * -4.0)); elseif (Float64(b * c) <= 2.12e+77) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b * c) <= -4.6e+34) tmp = b * c; elseif ((b * c) <= 3.9e-262) tmp = x * (i * -4.0); elseif ((b * c) <= 4800.0) tmp = t * (a * -4.0); elseif ((b * c) <= 2.12e+77) tmp = k * (j * -27.0); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -4.6e+34], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.9e-262], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4800.0], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.12e+77], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -4.6 \cdot 10^{+34}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 3.9 \cdot 10^{-262}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 4800:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.12 \cdot 10^{+77}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -4.5999999999999996e34 or 2.12000000000000006e77 < (*.f64 b c) Initial program 80.6%
Simplified85.8%
Taylor expanded in b around inf 61.5%
Taylor expanded in b around inf 54.8%
if -4.5999999999999996e34 < (*.f64 b c) < 3.89999999999999984e-262Initial program 88.0%
Simplified89.9%
Taylor expanded in x around inf 58.2%
Taylor expanded in t around 0 37.7%
if 3.89999999999999984e-262 < (*.f64 b c) < 4800Initial program 83.4%
Simplified88.3%
Taylor expanded in t around inf 64.4%
Taylor expanded in x around 0 35.2%
associate-*r*35.2%
Simplified35.2%
if 4800 < (*.f64 b c) < 2.12000000000000006e77Initial program 78.8%
Simplified89.0%
Taylor expanded in j around inf 67.0%
associate-*r*67.4%
*-commutative67.4%
metadata-eval67.4%
distribute-rgt-neg-in67.4%
*-commutative67.4%
distribute-rgt-neg-in67.4%
metadata-eval67.4%
*-commutative67.4%
Simplified67.4%
Final simplification44.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))))
(if (<= x -1.05e+68)
t_2
(if (<= x -6.5e-136)
(- (- (* b c) (* 4.0 (* x i))) t_1)
(if (<= x 3.1e+97) (- (- (* b c) (* 4.0 (* t a))) t_1) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.05e+68) {
tmp = t_2;
} else if (x <= -6.5e-136) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else if (x <= 3.1e+97) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
if (x <= (-1.05d+68)) then
tmp = t_2
else if (x <= (-6.5d-136)) then
tmp = ((b * c) - (4.0d0 * (x * i))) - t_1
else if (x <= 3.1d+97) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i));
double tmp;
if (x <= -1.05e+68) {
tmp = t_2;
} else if (x <= -6.5e-136) {
tmp = ((b * c) - (4.0 * (x * i))) - t_1;
} else if (x <= 3.1e+97) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)) tmp = 0 if x <= -1.05e+68: tmp = t_2 elif x <= -6.5e-136: tmp = ((b * c) - (4.0 * (x * i))) - t_1 elif x <= 3.1e+97: tmp = ((b * c) - (4.0 * (t * a))) - t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))) tmp = 0.0 if (x <= -1.05e+68) tmp = t_2; elseif (x <= -6.5e-136) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1); elseif (x <= 3.1e+97) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; t_2 = x * ((18.0 * (t * (y * z))) - (4.0 * i)); tmp = 0.0; if (x <= -1.05e+68) tmp = t_2; elseif (x <= -6.5e-136) tmp = ((b * c) - (4.0 * (x * i))) - t_1; elseif (x <= 3.1e+97) tmp = ((b * c) - (4.0 * (t * a))) - t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.05e+68], t$95$2, If[LessEqual[x, -6.5e-136], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 3.1e+97], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+68}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-136}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t\_1\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+97}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.05e68 or 3.09999999999999981e97 < x Initial program 69.5%
Simplified77.2%
Taylor expanded in x around inf 79.0%
if -1.05e68 < x < -6.50000000000000011e-136Initial program 95.5%
Taylor expanded in t around 0 82.2%
if -6.50000000000000011e-136 < x < 3.09999999999999981e97Initial program 92.7%
Taylor expanded in x around 0 74.9%
Final simplification77.8%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -5.4e-50) (not (<= t 6e-85))) (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5.4e-50) || !(t <= 6e-85)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-5.4d-50)) .or. (.not. (t <= 6d-85))) then
tmp = (b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -5.4e-50) || !(t <= 6e-85)) {
tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -5.4e-50) or not (t <= 6e-85): tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))) else: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -5.4e-50) || !(t <= 6e-85)) tmp = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) - Float64(a * 4.0)))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((t <= -5.4e-50) || ~((t <= 6e-85))) tmp = (b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0))); else tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -5.4e-50], N[Not[LessEqual[t, 6e-85]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.4 \cdot 10^{-50} \lor \neg \left(t \leq 6 \cdot 10^{-85}\right):\\
\;\;\;\;b \cdot c + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) - a \cdot 4\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -5.3999999999999999e-50 or 6.00000000000000044e-85 < t Initial program 85.7%
Simplified88.5%
Taylor expanded in j around 0 84.0%
Taylor expanded in i around 0 75.6%
if -5.3999999999999999e-50 < t < 6.00000000000000044e-85Initial program 82.0%
Taylor expanded in t around 0 79.1%
Final simplification77.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -6.5e+26)
(* b c)
(if (<= (* b c) 3.4e-69)
(* x (* i -4.0))
(if (<= (* b c) 6.4e+71) (* k (* j -27.0)) (* b c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6.5e+26) {
tmp = b * c;
} else if ((b * c) <= 3.4e-69) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 6.4e+71) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-6.5d+26)) then
tmp = b * c
else if ((b * c) <= 3.4d-69) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= 6.4d+71) then
tmp = k * (j * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -6.5e+26) {
tmp = b * c;
} else if ((b * c) <= 3.4e-69) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 6.4e+71) {
tmp = k * (j * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -6.5e+26: tmp = b * c elif (b * c) <= 3.4e-69: tmp = x * (i * -4.0) elif (b * c) <= 6.4e+71: tmp = k * (j * -27.0) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -6.5e+26) tmp = Float64(b * c); elseif (Float64(b * c) <= 3.4e-69) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= 6.4e+71) tmp = Float64(k * Float64(j * -27.0)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b * c) <= -6.5e+26) tmp = b * c; elseif ((b * c) <= 3.4e-69) tmp = x * (i * -4.0); elseif ((b * c) <= 6.4e+71) tmp = k * (j * -27.0); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -6.5e+26], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.4e-69], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.4e+71], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -6.5 \cdot 10^{+26}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 3.4 \cdot 10^{-69}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 6.4 \cdot 10^{+71}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -6.50000000000000022e26 or 6.40000000000000046e71 < (*.f64 b c) Initial program 80.6%
Simplified85.8%
Taylor expanded in b around inf 61.5%
Taylor expanded in b around inf 54.8%
if -6.50000000000000022e26 < (*.f64 b c) < 3.40000000000000008e-69Initial program 85.6%
Simplified88.5%
Taylor expanded in x around inf 58.3%
Taylor expanded in t around 0 33.0%
if 3.40000000000000008e-69 < (*.f64 b c) < 6.40000000000000046e71Initial program 90.9%
Simplified95.2%
Taylor expanded in j around inf 48.6%
associate-*r*48.8%
*-commutative48.8%
metadata-eval48.8%
distribute-rgt-neg-in48.8%
*-commutative48.8%
distribute-rgt-neg-in48.8%
metadata-eval48.8%
*-commutative48.8%
Simplified48.8%
Final simplification42.6%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -7.8e-29) (not (<= x 7.2e+97))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -7.8e-29) || !(x <= 7.2e+97)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-7.8d-29)) .or. (.not. (x <= 7.2d+97))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -7.8e-29) || !(x <= 7.2e+97)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -7.8e-29) or not (x <= 7.2e+97): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -7.8e-29) || !(x <= 7.2e+97)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((x <= -7.8e-29) || ~((x <= 7.2e+97))) tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)); else tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -7.8e-29], N[Not[LessEqual[x, 7.2e+97]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.8 \cdot 10^{-29} \lor \neg \left(x \leq 7.2 \cdot 10^{+97}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if x < -7.7999999999999995e-29 or 7.19999999999999932e97 < x Initial program 73.3%
Simplified79.9%
Taylor expanded in x around inf 75.8%
if -7.7999999999999995e-29 < x < 7.19999999999999932e97Initial program 93.4%
Taylor expanded in x around 0 76.0%
Final simplification75.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -9e-44)
(- (* b c) (* 4.0 (* x i)))
(if (<= x 1.05e-174)
(- (* b c) (* 27.0 (* j k)))
(if (<= x 1.1e+93)
(+ (* b c) (* (* t a) -4.0))
(* t (* 18.0 (* x (* y z))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -9e-44) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= 1.05e-174) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 1.1e+93) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = t * (18.0 * (x * (y * z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-9d-44)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= 1.05d-174) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (x <= 1.1d+93) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else
tmp = t * (18.0d0 * (x * (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -9e-44) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= 1.05e-174) {
tmp = (b * c) - (27.0 * (j * k));
} else if (x <= 1.1e+93) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = t * (18.0 * (x * (y * z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -9e-44: tmp = (b * c) - (4.0 * (x * i)) elif x <= 1.05e-174: tmp = (b * c) - (27.0 * (j * k)) elif x <= 1.1e+93: tmp = (b * c) + ((t * a) * -4.0) else: tmp = t * (18.0 * (x * (y * z))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -9e-44) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= 1.05e-174) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (x <= 1.1e+93) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); else tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -9e-44) tmp = (b * c) - (4.0 * (x * i)); elseif (x <= 1.05e-174) tmp = (b * c) - (27.0 * (j * k)); elseif (x <= 1.1e+93) tmp = (b * c) + ((t * a) * -4.0); else tmp = t * (18.0 * (x * (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -9e-44], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e-174], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+93], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9 \cdot 10^{-44}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{-174}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+93}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -8.9999999999999997e-44Initial program 75.3%
Taylor expanded in t around 0 62.3%
Taylor expanded in j around 0 53.9%
if -8.9999999999999997e-44 < x < 1.05000000000000005e-174Initial program 96.4%
Taylor expanded in t around 0 74.1%
Taylor expanded in i around 0 68.5%
if 1.05000000000000005e-174 < x < 1.10000000000000011e93Initial program 87.4%
Simplified93.7%
Taylor expanded in j around 0 87.5%
Taylor expanded in x around 0 51.0%
if 1.10000000000000011e93 < x Initial program 72.5%
Simplified80.8%
Taylor expanded in t around inf 69.8%
Taylor expanded in x around inf 57.8%
Final simplification59.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.85e-44)
(- (* b c) (* 4.0 (* x i)))
(if (<= x 6.8e-128)
(+ (* b c) (* j (* k -27.0)))
(if (<= x 5.4e+93)
(+ (* b c) (* (* t a) -4.0))
(* t (* 18.0 (* x (* y z))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.85e-44) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= 6.8e-128) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 5.4e+93) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = t * (18.0 * (x * (y * z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-1.85d-44)) then
tmp = (b * c) - (4.0d0 * (x * i))
else if (x <= 6.8d-128) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (x <= 5.4d+93) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else
tmp = t * (18.0d0 * (x * (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.85e-44) {
tmp = (b * c) - (4.0 * (x * i));
} else if (x <= 6.8e-128) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 5.4e+93) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = t * (18.0 * (x * (y * z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -1.85e-44: tmp = (b * c) - (4.0 * (x * i)) elif x <= 6.8e-128: tmp = (b * c) + (j * (k * -27.0)) elif x <= 5.4e+93: tmp = (b * c) + ((t * a) * -4.0) else: tmp = t * (18.0 * (x * (y * z))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.85e-44) tmp = Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))); elseif (x <= 6.8e-128) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (x <= 5.4e+93) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); else tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -1.85e-44) tmp = (b * c) - (4.0 * (x * i)); elseif (x <= 6.8e-128) tmp = (b * c) + (j * (k * -27.0)); elseif (x <= 5.4e+93) tmp = (b * c) + ((t * a) * -4.0); else tmp = t * (18.0 * (x * (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.85e-44], N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.8e-128], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.4e+93], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{-44}:\\
\;\;\;\;b \cdot c - 4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-128}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{+93}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.85e-44Initial program 75.3%
Taylor expanded in t around 0 62.3%
Taylor expanded in j around 0 53.9%
if -1.85e-44 < x < 6.7999999999999995e-128Initial program 95.5%
Simplified91.4%
Taylor expanded in b around inf 66.9%
if 6.7999999999999995e-128 < x < 5.3999999999999999e93Initial program 88.3%
Simplified95.3%
Taylor expanded in j around 0 90.7%
Taylor expanded in x around 0 52.2%
if 5.3999999999999999e93 < x Initial program 72.5%
Simplified80.8%
Taylor expanded in t around inf 69.8%
Taylor expanded in x around inf 57.8%
Final simplification58.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -3.2e+63)
(* 18.0 (* (* z t) (* x y)))
(if (<= x 1.5e-126)
(+ (* b c) (* j (* k -27.0)))
(if (<= x 4.5e+92)
(+ (* b c) (* (* t a) -4.0))
(* t (* 18.0 (* x (* y z))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.2e+63) {
tmp = 18.0 * ((z * t) * (x * y));
} else if (x <= 1.5e-126) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 4.5e+92) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = t * (18.0 * (x * (y * z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-3.2d+63)) then
tmp = 18.0d0 * ((z * t) * (x * y))
else if (x <= 1.5d-126) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (x <= 4.5d+92) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else
tmp = t * (18.0d0 * (x * (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -3.2e+63) {
tmp = 18.0 * ((z * t) * (x * y));
} else if (x <= 1.5e-126) {
tmp = (b * c) + (j * (k * -27.0));
} else if (x <= 4.5e+92) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = t * (18.0 * (x * (y * z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -3.2e+63: tmp = 18.0 * ((z * t) * (x * y)) elif x <= 1.5e-126: tmp = (b * c) + (j * (k * -27.0)) elif x <= 4.5e+92: tmp = (b * c) + ((t * a) * -4.0) else: tmp = t * (18.0 * (x * (y * z))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -3.2e+63) tmp = Float64(18.0 * Float64(Float64(z * t) * Float64(x * y))); elseif (x <= 1.5e-126) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (x <= 4.5e+92) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); else tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -3.2e+63) tmp = 18.0 * ((z * t) * (x * y)); elseif (x <= 1.5e-126) tmp = (b * c) + (j * (k * -27.0)); elseif (x <= 4.5e+92) tmp = (b * c) + ((t * a) * -4.0); else tmp = t * (18.0 * (x * (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -3.2e+63], N[(18.0 * N[(N[(z * t), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e-126], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+92], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{+63}:\\
\;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{-126}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+92}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -3.20000000000000011e63Initial program 68.6%
Simplified75.4%
Taylor expanded in t around inf 51.6%
Taylor expanded in x around inf 44.6%
associate-*r*44.7%
*-commutative44.7%
associate-*r*41.1%
Simplified41.1%
if -3.20000000000000011e63 < x < 1.5000000000000001e-126Initial program 95.4%
Simplified92.0%
Taylor expanded in b around inf 61.2%
if 1.5000000000000001e-126 < x < 4.4999999999999999e92Initial program 88.3%
Simplified95.3%
Taylor expanded in j around 0 90.7%
Taylor expanded in x around 0 52.2%
if 4.4999999999999999e92 < x Initial program 72.5%
Simplified80.8%
Taylor expanded in t around inf 69.8%
Taylor expanded in x around inf 57.8%
Final simplification54.7%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -6.4e-29) (not (<= x 2.46e-76))) (* x (- (* 18.0 (* t (* y z))) (* 4.0 i))) (- (* b c) (* 27.0 (* j k)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -6.4e-29) || !(x <= 2.46e-76)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-6.4d-29)) .or. (.not. (x <= 2.46d-76))) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -6.4e-29) || !(x <= 2.46e-76)) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -6.4e-29) or not (x <= 2.46e-76): tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -6.4e-29) || !(x <= 2.46e-76)) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((x <= -6.4e-29) || ~((x <= 2.46e-76))) tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)); else tmp = (b * c) - (27.0 * (j * k)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -6.4e-29], N[Not[LessEqual[x, 2.46e-76]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{-29} \lor \neg \left(x \leq 2.46 \cdot 10^{-76}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -6.400000000000001e-29 or 2.45999999999999993e-76 < x Initial program 77.3%
Simplified83.7%
Taylor expanded in x around inf 70.3%
if -6.400000000000001e-29 < x < 2.45999999999999993e-76Initial program 94.1%
Taylor expanded in t around 0 70.1%
Taylor expanded in i around 0 65.5%
Final simplification68.4%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -2.6e+58) (not (<= (* b c) 1.7e+73))) (* b c) (* (* j k) -27.0)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.6e+58) || !((b * c) <= 1.7e+73)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (((b * c) <= (-2.6d+58)) .or. (.not. ((b * c) <= 1.7d+73))) then
tmp = b * c
else
tmp = (j * k) * (-27.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (((b * c) <= -2.6e+58) || !((b * c) <= 1.7e+73)) {
tmp = b * c;
} else {
tmp = (j * k) * -27.0;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -2.6e+58) or not ((b * c) <= 1.7e+73): tmp = b * c else: tmp = (j * k) * -27.0 return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -2.6e+58) || !(Float64(b * c) <= 1.7e+73)) tmp = Float64(b * c); else tmp = Float64(Float64(j * k) * -27.0); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (((b * c) <= -2.6e+58) || ~(((b * c) <= 1.7e+73))) tmp = b * c; else tmp = (j * k) * -27.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -2.6e+58], N[Not[LessEqual[N[(b * c), $MachinePrecision], 1.7e+73]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.6 \cdot 10^{+58} \lor \neg \left(b \cdot c \leq 1.7 \cdot 10^{+73}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\end{array}
\end{array}
if (*.f64 b c) < -2.59999999999999988e58 or 1.7000000000000001e73 < (*.f64 b c) Initial program 80.2%
Simplified85.5%
Taylor expanded in b around inf 60.7%
Taylor expanded in b around inf 55.8%
if -2.59999999999999988e58 < (*.f64 b c) < 1.7000000000000001e73Initial program 86.5%
Simplified89.6%
Taylor expanded in j around inf 27.1%
Final simplification37.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -5.4e+117)
(* 18.0 (* (* z t) (* x y)))
(if (<= x 2.15e+94)
(+ (* b c) (* (* t a) -4.0))
(* t (* 18.0 (* x (* y z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -5.4e+117) {
tmp = 18.0 * ((z * t) * (x * y));
} else if (x <= 2.15e+94) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = t * (18.0 * (x * (y * z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-5.4d+117)) then
tmp = 18.0d0 * ((z * t) * (x * y))
else if (x <= 2.15d+94) then
tmp = (b * c) + ((t * a) * (-4.0d0))
else
tmp = t * (18.0d0 * (x * (y * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -5.4e+117) {
tmp = 18.0 * ((z * t) * (x * y));
} else if (x <= 2.15e+94) {
tmp = (b * c) + ((t * a) * -4.0);
} else {
tmp = t * (18.0 * (x * (y * z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -5.4e+117: tmp = 18.0 * ((z * t) * (x * y)) elif x <= 2.15e+94: tmp = (b * c) + ((t * a) * -4.0) else: tmp = t * (18.0 * (x * (y * z))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -5.4e+117) tmp = Float64(18.0 * Float64(Float64(z * t) * Float64(x * y))); elseif (x <= 2.15e+94) tmp = Float64(Float64(b * c) + Float64(Float64(t * a) * -4.0)); else tmp = Float64(t * Float64(18.0 * Float64(x * Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -5.4e+117) tmp = 18.0 * ((z * t) * (x * y)); elseif (x <= 2.15e+94) tmp = (b * c) + ((t * a) * -4.0); else tmp = t * (18.0 * (x * (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -5.4e+117], N[(18.0 * N[(N[(z * t), $MachinePrecision] * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.15e+94], N[(N[(b * c), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.4 \cdot 10^{+117}:\\
\;\;\;\;18 \cdot \left(\left(z \cdot t\right) \cdot \left(x \cdot y\right)\right)\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{+94}:\\
\;\;\;\;b \cdot c + \left(t \cdot a\right) \cdot -4\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.4000000000000005e117Initial program 67.5%
Simplified73.8%
Taylor expanded in t around inf 48.5%
Taylor expanded in x around inf 44.2%
associate-*r*46.4%
*-commutative46.4%
associate-*r*42.0%
Simplified42.0%
if -5.4000000000000005e117 < x < 2.15e94Initial program 92.0%
Simplified90.9%
Taylor expanded in j around 0 73.4%
Taylor expanded in x around 0 50.9%
if 2.15e94 < x Initial program 72.5%
Simplified80.8%
Taylor expanded in t around inf 69.8%
Taylor expanded in x around inf 57.8%
Final simplification50.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 84.1%
Simplified88.0%
Taylor expanded in b around inf 40.6%
Taylor expanded in b around inf 23.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 2024135
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))