
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(+
(fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* x (* i -4.0))))
(* j (* k -27.0)))
(* x (- (* 18.0 (* y (* z t))) (* 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 (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (x * (i * -4.0)))) + (j * (k * -27.0));
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = Float64(fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(x * Float64(i * -4.0)))) + Float64(j * Float64(k * -27.0))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, x \cdot \left(i \cdot -4\right)\right)\right) + j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.6%
Simplified95.5%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified22.7%
Taylor expanded in x around inf 59.3%
expm1-log1p-u41.1%
expm1-udef41.1%
Applied egg-rr41.1%
expm1-def41.1%
expm1-log1p59.3%
*-commutative59.3%
associate-*l*63.8%
Simplified63.8%
Final simplification92.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))
(* x (- (* 18.0 (* y (* z t))) (* 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 (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (y * (z * t))) - (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 tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Double.POSITIVE_INFINITY) {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
} else {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= math.inf: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) else: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(Float64(x * 18.0) * Float64(y * z)) - Float64(a * 4.0)))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); else tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - 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 (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= Inf) tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))); else tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\left(b \cdot c + t \cdot \left(\left(x \cdot 18\right) \cdot \left(y \cdot z\right) - a \cdot 4\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 95.6%
Simplified95.5%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) Initial program 0.0%
Simplified22.7%
Taylor expanded in x around inf 59.3%
expm1-log1p-u41.1%
expm1-udef41.1%
Applied egg-rr41.1%
expm1-def41.1%
expm1-log1p59.3%
*-commutative59.3%
associate-*l*63.8%
Simplified63.8%
Final simplification92.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -27.0 (* j k))) (t_2 (* -4.0 (* t a))))
(if (<= (* b c) -1.95e+305)
(* b c)
(if (<= (* b c) -8.2e-53)
t_1
(if (<= (* b c) -7.2e-144)
t_2
(if (<= (* b c) -5e-324)
t_1
(if (<= (* b c) 3e-117)
t_2
(if (<= (* b c) 1.02e-80)
t_1
(if (<= (* b c) 9e+130) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -8.2e-53) {
tmp = t_1;
} else if ((b * c) <= -7.2e-144) {
tmp = t_2;
} else if ((b * c) <= -5e-324) {
tmp = t_1;
} else if ((b * c) <= 3e-117) {
tmp = t_2;
} else if ((b * c) <= 1.02e-80) {
tmp = t_1;
} else if ((b * c) <= 9e+130) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (-27.0d0) * (j * k)
t_2 = (-4.0d0) * (t * a)
if ((b * c) <= (-1.95d+305)) then
tmp = b * c
else if ((b * c) <= (-8.2d-53)) then
tmp = t_1
else if ((b * c) <= (-7.2d-144)) then
tmp = t_2
else if ((b * c) <= (-5d-324)) then
tmp = t_1
else if ((b * c) <= 3d-117) then
tmp = t_2
else if ((b * c) <= 1.02d-80) then
tmp = t_1
else if ((b * c) <= 9d+130) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -27.0 * (j * k);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -8.2e-53) {
tmp = t_1;
} else if ((b * c) <= -7.2e-144) {
tmp = t_2;
} else if ((b * c) <= -5e-324) {
tmp = t_1;
} else if ((b * c) <= 3e-117) {
tmp = t_2;
} else if ((b * c) <= 1.02e-80) {
tmp = t_1;
} else if ((b * c) <= 9e+130) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -27.0 * (j * k) t_2 = -4.0 * (t * a) tmp = 0 if (b * c) <= -1.95e+305: tmp = b * c elif (b * c) <= -8.2e-53: tmp = t_1 elif (b * c) <= -7.2e-144: tmp = t_2 elif (b * c) <= -5e-324: tmp = t_1 elif (b * c) <= 3e-117: tmp = t_2 elif (b * c) <= 1.02e-80: tmp = t_1 elif (b * c) <= 9e+130: tmp = t_2 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-27.0 * Float64(j * k)) t_2 = Float64(-4.0 * Float64(t * a)) tmp = 0.0 if (Float64(b * c) <= -1.95e+305) tmp = Float64(b * c); elseif (Float64(b * c) <= -8.2e-53) tmp = t_1; elseif (Float64(b * c) <= -7.2e-144) tmp = t_2; elseif (Float64(b * c) <= -5e-324) tmp = t_1; elseif (Float64(b * c) <= 3e-117) tmp = t_2; elseif (Float64(b * c) <= 1.02e-80) tmp = t_1; elseif (Float64(b * c) <= 9e+130) tmp = t_2; else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -27.0 * (j * k); t_2 = -4.0 * (t * a); tmp = 0.0; if ((b * c) <= -1.95e+305) tmp = b * c; elseif ((b * c) <= -8.2e-53) tmp = t_1; elseif ((b * c) <= -7.2e-144) tmp = t_2; elseif ((b * c) <= -5e-324) tmp = t_1; elseif ((b * c) <= 3e-117) tmp = t_2; elseif ((b * c) <= 1.02e-80) tmp = t_1; elseif ((b * c) <= 9e+130) tmp = t_2; else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -8.2e-53], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -7.2e-144], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5e-324], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 3e-117], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 1.02e-80], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 9e+130], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -27 \cdot \left(j \cdot k\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -8.2 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 3 \cdot 10^{-117}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 1.02 \cdot 10^{-80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 9.00000000000000078e130 < (*.f64 b c) Initial program 81.6%
Simplified86.6%
Taylor expanded in x around -inf 81.3%
Simplified84.7%
Taylor expanded in b around inf 75.9%
if -1.95e305 < (*.f64 b c) < -8.2000000000000001e-53 or -7.2000000000000001e-144 < (*.f64 b c) < -4.94066e-324 or 2.99999999999999991e-117 < (*.f64 b c) < 1.02000000000000005e-80Initial program 91.5%
Simplified92.8%
Taylor expanded in j around inf 44.3%
if -8.2000000000000001e-53 < (*.f64 b c) < -7.2000000000000001e-144 or -4.94066e-324 < (*.f64 b c) < 2.99999999999999991e-117 or 1.02000000000000005e-80 < (*.f64 b c) < 9.00000000000000078e130Initial program 87.4%
Simplified90.7%
Taylor expanded in x around -inf 88.1%
Simplified88.1%
Taylor expanded in a around inf 41.9%
Final simplification50.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* -4.0 (* t a))))
(if (<= (* b c) -1.95e+305)
(* b c)
(if (<= (* b c) -1.05e-55)
t_1
(if (<= (* b c) -7.2e-144)
t_2
(if (<= (* b c) -5e-324)
t_1
(if (<= (* b c) 1.35e-111)
t_2
(if (<= (* b c) 3.6e-78)
(* -27.0 (* j k))
(if (<= (* b c) 3.5e+127) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -1.05e-55) {
tmp = t_1;
} else if ((b * c) <= -7.2e-144) {
tmp = t_2;
} else if ((b * c) <= -5e-324) {
tmp = t_1;
} else if ((b * c) <= 1.35e-111) {
tmp = t_2;
} else if ((b * c) <= 3.6e-78) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 3.5e+127) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = (-4.0d0) * (t * a)
if ((b * c) <= (-1.95d+305)) then
tmp = b * c
else if ((b * c) <= (-1.05d-55)) then
tmp = t_1
else if ((b * c) <= (-7.2d-144)) then
tmp = t_2
else if ((b * c) <= (-5d-324)) then
tmp = t_1
else if ((b * c) <= 1.35d-111) then
tmp = t_2
else if ((b * c) <= 3.6d-78) then
tmp = (-27.0d0) * (j * k)
else if ((b * c) <= 3.5d+127) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -1.05e-55) {
tmp = t_1;
} else if ((b * c) <= -7.2e-144) {
tmp = t_2;
} else if ((b * c) <= -5e-324) {
tmp = t_1;
} else if ((b * c) <= 1.35e-111) {
tmp = t_2;
} else if ((b * c) <= 3.6e-78) {
tmp = -27.0 * (j * k);
} else if ((b * c) <= 3.5e+127) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = -4.0 * (t * a) tmp = 0 if (b * c) <= -1.95e+305: tmp = b * c elif (b * c) <= -1.05e-55: tmp = t_1 elif (b * c) <= -7.2e-144: tmp = t_2 elif (b * c) <= -5e-324: tmp = t_1 elif (b * c) <= 1.35e-111: tmp = t_2 elif (b * c) <= 3.6e-78: tmp = -27.0 * (j * k) elif (b * c) <= 3.5e+127: tmp = t_2 else: tmp = b * c 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(-4.0 * Float64(t * a)) tmp = 0.0 if (Float64(b * c) <= -1.95e+305) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.05e-55) tmp = t_1; elseif (Float64(b * c) <= -7.2e-144) tmp = t_2; elseif (Float64(b * c) <= -5e-324) tmp = t_1; elseif (Float64(b * c) <= 1.35e-111) tmp = t_2; elseif (Float64(b * c) <= 3.6e-78) tmp = Float64(-27.0 * Float64(j * k)); elseif (Float64(b * c) <= 3.5e+127) tmp = t_2; else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = j * (k * -27.0); t_2 = -4.0 * (t * a); tmp = 0.0; if ((b * c) <= -1.95e+305) tmp = b * c; elseif ((b * c) <= -1.05e-55) tmp = t_1; elseif ((b * c) <= -7.2e-144) tmp = t_2; elseif ((b * c) <= -5e-324) tmp = t_1; elseif ((b * c) <= 1.35e-111) tmp = t_2; elseif ((b * c) <= 3.6e-78) tmp = -27.0 * (j * k); elseif ((b * c) <= 3.5e+127) tmp = t_2; else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.05e-55], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -7.2e-144], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5e-324], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.35e-111], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 3.6e-78], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.5e+127], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{-144}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.35 \cdot 10^{-111}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{-78}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 3.49999999999999978e127 < (*.f64 b c) Initial program 81.6%
Simplified86.6%
Taylor expanded in x around -inf 81.3%
Simplified84.7%
Taylor expanded in b around inf 75.9%
if -1.95e305 < (*.f64 b c) < -1.0500000000000001e-55 or -7.2000000000000001e-144 < (*.f64 b c) < -4.94066e-324Initial program 91.6%
Simplified93.1%
Taylor expanded in x around -inf 91.6%
Simplified91.6%
Taylor expanded in k around inf 40.5%
associate-*r*40.5%
*-commutative40.5%
associate-*r*40.6%
Simplified40.6%
if -1.0500000000000001e-55 < (*.f64 b c) < -7.2000000000000001e-144 or -4.94066e-324 < (*.f64 b c) < 1.34999999999999994e-111 or 3.6000000000000002e-78 < (*.f64 b c) < 3.49999999999999978e127Initial program 87.4%
Simplified90.7%
Taylor expanded in x around -inf 88.1%
Simplified88.1%
Taylor expanded in a around inf 41.9%
if 1.34999999999999994e-111 < (*.f64 b c) < 3.6000000000000002e-78Initial program 90.8%
Simplified91.0%
Taylor expanded in j around inf 71.0%
Final simplification50.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))) (t_2 (* -4.0 (* t a))))
(if (<= (* b c) -1.95e+305)
(* b c)
(if (<= (* b c) -1.1e-48)
(* j (* k -27.0))
(if (<= (* b c) -3.3e-143)
t_2
(if (<= (* b c) -5e-324)
t_1
(if (<= (* b c) 9.6e-113)
t_2
(if (<= (* b c) 8.2e-81)
t_1
(if (<= (* b c) 1.6e+125) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -1.1e-48) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -3.3e-143) {
tmp = t_2;
} else if ((b * c) <= -5e-324) {
tmp = t_1;
} else if ((b * c) <= 9.6e-113) {
tmp = t_2;
} else if ((b * c) <= 8.2e-81) {
tmp = t_1;
} else if ((b * c) <= 1.6e+125) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
t_2 = (-4.0d0) * (t * a)
if ((b * c) <= (-1.95d+305)) then
tmp = b * c
else if ((b * c) <= (-1.1d-48)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= (-3.3d-143)) then
tmp = t_2
else if ((b * c) <= (-5d-324)) then
tmp = t_1
else if ((b * c) <= 9.6d-113) then
tmp = t_2
else if ((b * c) <= 8.2d-81) then
tmp = t_1
else if ((b * c) <= 1.6d+125) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -1.1e-48) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -3.3e-143) {
tmp = t_2;
} else if ((b * c) <= -5e-324) {
tmp = t_1;
} else if ((b * c) <= 9.6e-113) {
tmp = t_2;
} else if ((b * c) <= 8.2e-81) {
tmp = t_1;
} else if ((b * c) <= 1.6e+125) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = -4.0 * (t * a) tmp = 0 if (b * c) <= -1.95e+305: tmp = b * c elif (b * c) <= -1.1e-48: tmp = j * (k * -27.0) elif (b * c) <= -3.3e-143: tmp = t_2 elif (b * c) <= -5e-324: tmp = t_1 elif (b * c) <= 9.6e-113: tmp = t_2 elif (b * c) <= 8.2e-81: tmp = t_1 elif (b * c) <= 1.6e+125: tmp = t_2 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(-4.0 * Float64(t * a)) tmp = 0.0 if (Float64(b * c) <= -1.95e+305) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.1e-48) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= -3.3e-143) tmp = t_2; elseif (Float64(b * c) <= -5e-324) tmp = t_1; elseif (Float64(b * c) <= 9.6e-113) tmp = t_2; elseif (Float64(b * c) <= 8.2e-81) tmp = t_1; elseif (Float64(b * c) <= 1.6e+125) tmp = t_2; else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = k * (j * -27.0); t_2 = -4.0 * (t * a); tmp = 0.0; if ((b * c) <= -1.95e+305) tmp = b * c; elseif ((b * c) <= -1.1e-48) tmp = j * (k * -27.0); elseif ((b * c) <= -3.3e-143) tmp = t_2; elseif ((b * c) <= -5e-324) tmp = t_1; elseif ((b * c) <= 9.6e-113) tmp = t_2; elseif ((b * c) <= 8.2e-81) tmp = t_1; elseif ((b * c) <= 1.6e+125) tmp = t_2; else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.1e-48], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -3.3e-143], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -5e-324], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 9.6e-113], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 8.2e-81], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.6e+125], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.1 \cdot 10^{-48}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -3.3 \cdot 10^{-143}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 9.6 \cdot 10^{-113}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 8.2 \cdot 10^{-81}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{+125}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 1.59999999999999992e125 < (*.f64 b c) Initial program 81.6%
Simplified86.6%
Taylor expanded in x around -inf 81.3%
Simplified84.7%
Taylor expanded in b around inf 75.9%
if -1.95e305 < (*.f64 b c) < -1.10000000000000006e-48Initial program 89.6%
Simplified91.7%
Taylor expanded in x around -inf 91.5%
Simplified91.5%
Taylor expanded in k around inf 36.8%
associate-*r*36.8%
*-commutative36.8%
associate-*r*36.8%
Simplified36.8%
if -1.10000000000000006e-48 < (*.f64 b c) < -3.3000000000000001e-143 or -4.94066e-324 < (*.f64 b c) < 9.60000000000000049e-113 or 8.19999999999999968e-81 < (*.f64 b c) < 1.59999999999999992e125Initial program 87.4%
Simplified90.7%
Taylor expanded in x around -inf 88.1%
Simplified88.1%
Taylor expanded in a around inf 41.9%
if -3.3000000000000001e-143 < (*.f64 b c) < -4.94066e-324 or 9.60000000000000049e-113 < (*.f64 b c) < 8.19999999999999968e-81Initial program 94.1%
Simplified94.4%
Taylor expanded in j around inf 54.5%
*-commutative54.5%
*-commutative54.5%
associate-*r*54.5%
Simplified54.5%
Final simplification50.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* k (* j -27.0))) (t_2 (* -4.0 (* t a))))
(if (<= (* b c) -1.95e+305)
(* b c)
(if (<= (* b c) -1.3e-58)
(* j (* k -27.0))
(if (<= (* b c) -1.3e-132)
(* x (* i -4.0))
(if (<= (* b c) -5e-324)
t_1
(if (<= (* b c) 4.5e-113)
t_2
(if (<= (* b c) 4.5e-77)
t_1
(if (<= (* b c) 2.3e+127) t_2 (* b c))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -1.3e-58) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -1.3e-132) {
tmp = x * (i * -4.0);
} else if ((b * c) <= -5e-324) {
tmp = t_1;
} else if ((b * c) <= 4.5e-113) {
tmp = t_2;
} else if ((b * c) <= 4.5e-77) {
tmp = t_1;
} else if ((b * c) <= 2.3e+127) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = k * (j * (-27.0d0))
t_2 = (-4.0d0) * (t * a)
if ((b * c) <= (-1.95d+305)) then
tmp = b * c
else if ((b * c) <= (-1.3d-58)) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= (-1.3d-132)) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= (-5d-324)) then
tmp = t_1
else if ((b * c) <= 4.5d-113) then
tmp = t_2
else if ((b * c) <= 4.5d-77) then
tmp = t_1
else if ((b * c) <= 2.3d+127) then
tmp = t_2
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = k * (j * -27.0);
double t_2 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1.95e+305) {
tmp = b * c;
} else if ((b * c) <= -1.3e-58) {
tmp = j * (k * -27.0);
} else if ((b * c) <= -1.3e-132) {
tmp = x * (i * -4.0);
} else if ((b * c) <= -5e-324) {
tmp = t_1;
} else if ((b * c) <= 4.5e-113) {
tmp = t_2;
} else if ((b * c) <= 4.5e-77) {
tmp = t_1;
} else if ((b * c) <= 2.3e+127) {
tmp = t_2;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = k * (j * -27.0) t_2 = -4.0 * (t * a) tmp = 0 if (b * c) <= -1.95e+305: tmp = b * c elif (b * c) <= -1.3e-58: tmp = j * (k * -27.0) elif (b * c) <= -1.3e-132: tmp = x * (i * -4.0) elif (b * c) <= -5e-324: tmp = t_1 elif (b * c) <= 4.5e-113: tmp = t_2 elif (b * c) <= 4.5e-77: tmp = t_1 elif (b * c) <= 2.3e+127: tmp = t_2 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(k * Float64(j * -27.0)) t_2 = Float64(-4.0 * Float64(t * a)) tmp = 0.0 if (Float64(b * c) <= -1.95e+305) tmp = Float64(b * c); elseif (Float64(b * c) <= -1.3e-58) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= -1.3e-132) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= -5e-324) tmp = t_1; elseif (Float64(b * c) <= 4.5e-113) tmp = t_2; elseif (Float64(b * c) <= 4.5e-77) tmp = t_1; elseif (Float64(b * c) <= 2.3e+127) tmp = t_2; else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = k * (j * -27.0); t_2 = -4.0 * (t * a); tmp = 0.0; if ((b * c) <= -1.95e+305) tmp = b * c; elseif ((b * c) <= -1.3e-58) tmp = j * (k * -27.0); elseif ((b * c) <= -1.3e-132) tmp = x * (i * -4.0); elseif ((b * c) <= -5e-324) tmp = t_1; elseif ((b * c) <= 4.5e-113) tmp = t_2; elseif ((b * c) <= 4.5e-77) tmp = t_1; elseif ((b * c) <= 2.3e+127) tmp = t_2; else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.3e-58], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.3e-132], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-324], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 4.5e-113], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], 4.5e-77], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2.3e+127], t$95$2, N[(b * c), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right)\\
t_2 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-58}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq -1.3 \cdot 10^{-132}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-324}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 4.5 \cdot 10^{-113}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq 4.5 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2.3 \cdot 10^{+127}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 2.3000000000000002e127 < (*.f64 b c) Initial program 81.6%
Simplified86.6%
Taylor expanded in x around -inf 81.3%
Simplified84.7%
Taylor expanded in b around inf 75.9%
if -1.95e305 < (*.f64 b c) < -1.30000000000000003e-58Initial program 89.9%
Simplified91.9%
Taylor expanded in x around -inf 91.7%
Simplified91.7%
Taylor expanded in k around inf 36.1%
associate-*r*36.1%
*-commutative36.1%
associate-*r*36.1%
Simplified36.1%
if -1.30000000000000003e-58 < (*.f64 b c) < -1.3e-132Initial program 86.7%
Simplified86.9%
Taylor expanded in x around -inf 86.9%
Simplified86.9%
Taylor expanded in i around inf 67.8%
associate-*r*67.8%
*-commutative67.8%
Simplified67.8%
if -1.3e-132 < (*.f64 b c) < -4.94066e-324 or 4.5000000000000001e-113 < (*.f64 b c) < 4.5000000000000001e-77Initial program 94.7%
Simplified95.0%
Taylor expanded in j around inf 51.5%
*-commutative51.5%
*-commutative51.5%
associate-*r*51.5%
Simplified51.5%
if -4.94066e-324 < (*.f64 b c) < 4.5000000000000001e-113 or 4.5000000000000001e-77 < (*.f64 b c) < 2.3000000000000002e127Initial program 86.8%
Simplified90.8%
Taylor expanded in x around -inf 87.7%
Simplified87.8%
Taylor expanded in a around inf 43.0%
Final simplification52.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= (* b c) -5.7e+209)
t_2
(if (<= (* b c) -7.2e+179)
(* t (+ (* 18.0 (* x (* y z))) (* a -4.0)))
(if (<= (* b c) -5.5e+58)
t_2
(if (<= (* b c) -8.8e-110)
(+ t_1 (* x (* i -4.0)))
(if (<= (* b c) 1.15e+124) (+ t_1 (* -4.0 (* t a))) 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 * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if ((b * c) <= -5.7e+209) {
tmp = t_2;
} else if ((b * c) <= -7.2e+179) {
tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0));
} else if ((b * c) <= -5.5e+58) {
tmp = t_2;
} else if ((b * c) <= -8.8e-110) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 1.15e+124) {
tmp = t_1 + (-4.0 * (t * a));
} 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 * (k * (-27.0d0))
t_2 = (b * c) + t_1
if ((b * c) <= (-5.7d+209)) then
tmp = t_2
else if ((b * c) <= (-7.2d+179)) then
tmp = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
else if ((b * c) <= (-5.5d+58)) then
tmp = t_2
else if ((b * c) <= (-8.8d-110)) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if ((b * c) <= 1.15d+124) then
tmp = t_1 + ((-4.0d0) * (t * a))
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 * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if ((b * c) <= -5.7e+209) {
tmp = t_2;
} else if ((b * c) <= -7.2e+179) {
tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0));
} else if ((b * c) <= -5.5e+58) {
tmp = t_2;
} else if ((b * c) <= -8.8e-110) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 1.15e+124) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 tmp = 0 if (b * c) <= -5.7e+209: tmp = t_2 elif (b * c) <= -7.2e+179: tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0)) elif (b * c) <= -5.5e+58: tmp = t_2 elif (b * c) <= -8.8e-110: tmp = t_1 + (x * (i * -4.0)) elif (b * c) <= 1.15e+124: tmp = t_1 + (-4.0 * (t * a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (Float64(b * c) <= -5.7e+209) tmp = t_2; elseif (Float64(b * c) <= -7.2e+179) tmp = Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))); elseif (Float64(b * c) <= -5.5e+58) tmp = t_2; elseif (Float64(b * c) <= -8.8e-110) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 1.15e+124) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); 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 * (k * -27.0); t_2 = (b * c) + t_1; tmp = 0.0; if ((b * c) <= -5.7e+209) tmp = t_2; elseif ((b * c) <= -7.2e+179) tmp = t * ((18.0 * (x * (y * z))) + (a * -4.0)); elseif ((b * c) <= -5.5e+58) tmp = t_2; elseif ((b * c) <= -8.8e-110) tmp = t_1 + (x * (i * -4.0)); elseif ((b * c) <= 1.15e+124) tmp = t_1 + (-4.0 * (t * a)); 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5.7e+209], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -7.2e+179], N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5.5e+58], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -8.8e-110], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.15e+124], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
\mathbf{if}\;b \cdot c \leq -5.7 \cdot 10^{+209}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -7.2 \cdot 10^{+179}:\\
\;\;\;\;t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq -5.5 \cdot 10^{+58}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -8.8 \cdot 10^{-110}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 1.15 \cdot 10^{+124}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -5.7000000000000001e209 or -7.1999999999999995e179 < (*.f64 b c) < -5.4999999999999999e58 or 1.14999999999999992e124 < (*.f64 b c) Initial program 83.2%
Simplified86.8%
Taylor expanded in b around inf 76.4%
if -5.7000000000000001e209 < (*.f64 b c) < -7.1999999999999995e179Initial program 88.3%
Simplified100.0%
Taylor expanded in x around -inf 99.8%
Simplified99.8%
Taylor expanded in t around inf 75.5%
if -5.4999999999999999e58 < (*.f64 b c) < -8.7999999999999997e-110Initial program 88.4%
Simplified88.4%
Taylor expanded in i around inf 79.5%
associate-*r*79.5%
*-commutative79.5%
Simplified79.5%
if -8.7999999999999997e-110 < (*.f64 b c) < 1.14999999999999992e124Initial program 89.5%
Simplified92.3%
Taylor expanded in a around inf 61.2%
*-commutative61.2%
Simplified61.2%
Final simplification68.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* b c) (* -4.0 (* t a))))
(t_2 (* -27.0 (* j k)))
(t_3 (* x (* i -4.0))))
(if (<= i -2.5e+106)
t_3
(if (<= i -2.6e-193)
t_1
(if (<= i -1.31e-291)
(* 18.0 (* x (* z (* y t))))
(if (<= i 8.8e-290)
t_2
(if (<= i 1.45e-41)
t_1
(if (<= i 1650000.0) t_2 (if (<= i 2.9e+188) t_1 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = -27.0 * (j * k);
double t_3 = x * (i * -4.0);
double tmp;
if (i <= -2.5e+106) {
tmp = t_3;
} else if (i <= -2.6e-193) {
tmp = t_1;
} else if (i <= -1.31e-291) {
tmp = 18.0 * (x * (z * (y * t)));
} else if (i <= 8.8e-290) {
tmp = t_2;
} else if (i <= 1.45e-41) {
tmp = t_1;
} else if (i <= 1650000.0) {
tmp = t_2;
} else if (i <= 2.9e+188) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (b * c) + ((-4.0d0) * (t * a))
t_2 = (-27.0d0) * (j * k)
t_3 = x * (i * (-4.0d0))
if (i <= (-2.5d+106)) then
tmp = t_3
else if (i <= (-2.6d-193)) then
tmp = t_1
else if (i <= (-1.31d-291)) then
tmp = 18.0d0 * (x * (z * (y * t)))
else if (i <= 8.8d-290) then
tmp = t_2
else if (i <= 1.45d-41) then
tmp = t_1
else if (i <= 1650000.0d0) then
tmp = t_2
else if (i <= 2.9d+188) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (b * c) + (-4.0 * (t * a));
double t_2 = -27.0 * (j * k);
double t_3 = x * (i * -4.0);
double tmp;
if (i <= -2.5e+106) {
tmp = t_3;
} else if (i <= -2.6e-193) {
tmp = t_1;
} else if (i <= -1.31e-291) {
tmp = 18.0 * (x * (z * (y * t)));
} else if (i <= 8.8e-290) {
tmp = t_2;
} else if (i <= 1.45e-41) {
tmp = t_1;
} else if (i <= 1650000.0) {
tmp = t_2;
} else if (i <= 2.9e+188) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (b * c) + (-4.0 * (t * a)) t_2 = -27.0 * (j * k) t_3 = x * (i * -4.0) tmp = 0 if i <= -2.5e+106: tmp = t_3 elif i <= -2.6e-193: tmp = t_1 elif i <= -1.31e-291: tmp = 18.0 * (x * (z * (y * t))) elif i <= 8.8e-290: tmp = t_2 elif i <= 1.45e-41: tmp = t_1 elif i <= 1650000.0: tmp = t_2 elif i <= 2.9e+188: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) t_2 = Float64(-27.0 * Float64(j * k)) t_3 = Float64(x * Float64(i * -4.0)) tmp = 0.0 if (i <= -2.5e+106) tmp = t_3; elseif (i <= -2.6e-193) tmp = t_1; elseif (i <= -1.31e-291) tmp = Float64(18.0 * Float64(x * Float64(z * Float64(y * t)))); elseif (i <= 8.8e-290) tmp = t_2; elseif (i <= 1.45e-41) tmp = t_1; elseif (i <= 1650000.0) tmp = t_2; elseif (i <= 2.9e+188) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (b * c) + (-4.0 * (t * a)); t_2 = -27.0 * (j * k); t_3 = x * (i * -4.0); tmp = 0.0; if (i <= -2.5e+106) tmp = t_3; elseif (i <= -2.6e-193) tmp = t_1; elseif (i <= -1.31e-291) tmp = 18.0 * (x * (z * (y * t))); elseif (i <= 8.8e-290) tmp = t_2; elseif (i <= 1.45e-41) tmp = t_1; elseif (i <= 1650000.0) tmp = t_2; elseif (i <= 2.9e+188) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -2.5e+106], t$95$3, If[LessEqual[i, -2.6e-193], t$95$1, If[LessEqual[i, -1.31e-291], N[(18.0 * N[(x * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 8.8e-290], t$95$2, If[LessEqual[i, 1.45e-41], t$95$1, If[LessEqual[i, 1650000.0], t$95$2, If[LessEqual[i, 2.9e+188], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot c + -4 \cdot \left(t \cdot a\right)\\
t_2 := -27 \cdot \left(j \cdot k\right)\\
t_3 := x \cdot \left(i \cdot -4\right)\\
\mathbf{if}\;i \leq -2.5 \cdot 10^{+106}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;i \leq -2.6 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq -1.31 \cdot 10^{-291}:\\
\;\;\;\;18 \cdot \left(x \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\mathbf{elif}\;i \leq 8.8 \cdot 10^{-290}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 1.45 \cdot 10^{-41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1650000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 2.9 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if i < -2.4999999999999999e106 or 2.8999999999999999e188 < i Initial program 84.8%
Simplified87.5%
Taylor expanded in x around -inf 87.5%
Simplified87.6%
Taylor expanded in i around inf 55.9%
associate-*r*55.9%
*-commutative55.9%
Simplified55.9%
if -2.4999999999999999e106 < i < -2.60000000000000008e-193 or 8.8000000000000004e-290 < i < 1.44999999999999989e-41 or 1.65e6 < i < 2.8999999999999999e188Initial program 90.3%
Simplified90.9%
Taylor expanded in x around 0 75.5%
associate--l+75.5%
*-commutative75.5%
associate-*r*75.5%
fma-def76.2%
*-commutative76.2%
*-commutative76.2%
Applied egg-rr76.2%
Taylor expanded in k around 0 60.5%
if -2.60000000000000008e-193 < i < -1.31e-291Initial program 76.7%
Simplified76.8%
Taylor expanded in x around -inf 82.4%
Simplified82.6%
Taylor expanded in y around inf 46.3%
*-commutative46.3%
associate-*l*46.4%
*-commutative46.4%
associate-*r*58.0%
*-commutative58.0%
Simplified58.0%
if -1.31e-291 < i < 8.8000000000000004e-290 or 1.44999999999999989e-41 < i < 1.65e6Initial program 81.8%
Simplified93.6%
Taylor expanded in j around inf 75.5%
Final simplification60.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))
(t_3 (+ t_1 (* -4.0 (* t a)))))
(if (<= c -6.2e-228)
t_2
(if (<= c -5.2e-280)
t_3
(if (<= c 4.6e-265)
t_2
(if (<= c 2.8e-65)
t_3
(if (<= c 72000000000000.0)
(+ t_1 (* x (* i -4.0)))
(if (<= c 4.5e+91)
(* x (- (* 18.0 (* t (* y z))) (* 4.0 i)))
(+ (* b c) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double t_3 = t_1 + (-4.0 * (t * a));
double tmp;
if (c <= -6.2e-228) {
tmp = t_2;
} else if (c <= -5.2e-280) {
tmp = t_3;
} else if (c <= 4.6e-265) {
tmp = t_2;
} else if (c <= 2.8e-65) {
tmp = t_3;
} else if (c <= 72000000000000.0) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 4.5e+91) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
t_3 = t_1 + ((-4.0d0) * (t * a))
if (c <= (-6.2d-228)) then
tmp = t_2
else if (c <= (-5.2d-280)) then
tmp = t_3
else if (c <= 4.6d-265) then
tmp = t_2
else if (c <= 2.8d-65) then
tmp = t_3
else if (c <= 72000000000000.0d0) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if (c <= 4.5d+91) then
tmp = x * ((18.0d0 * (t * (y * z))) - (4.0d0 * i))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double t_3 = t_1 + (-4.0 * (t * a));
double tmp;
if (c <= -6.2e-228) {
tmp = t_2;
} else if (c <= -5.2e-280) {
tmp = t_3;
} else if (c <= 4.6e-265) {
tmp = t_2;
} else if (c <= 2.8e-65) {
tmp = t_3;
} else if (c <= 72000000000000.0) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 4.5e+91) {
tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0)) t_3 = t_1 + (-4.0 * (t * a)) tmp = 0 if c <= -6.2e-228: tmp = t_2 elif c <= -5.2e-280: tmp = t_3 elif c <= 4.6e-265: tmp = t_2 elif c <= 2.8e-65: tmp = t_3 elif c <= 72000000000000.0: tmp = t_1 + (x * (i * -4.0)) elif c <= 4.5e+91: tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)) else: tmp = (b * c) + t_1 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 * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (c <= -6.2e-228) tmp = t_2; elseif (c <= -5.2e-280) tmp = t_3; elseif (c <= 4.6e-265) tmp = t_2; elseif (c <= 2.8e-65) tmp = t_3; elseif (c <= 72000000000000.0) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (c <= 4.5e+91) tmp = Float64(x * Float64(Float64(18.0 * Float64(t * Float64(y * z))) - Float64(4.0 * i))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = j * (k * -27.0); t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0)); t_3 = t_1 + (-4.0 * (t * a)); tmp = 0.0; if (c <= -6.2e-228) tmp = t_2; elseif (c <= -5.2e-280) tmp = t_3; elseif (c <= 4.6e-265) tmp = t_2; elseif (c <= 2.8e-65) tmp = t_3; elseif (c <= 72000000000000.0) tmp = t_1 + (x * (i * -4.0)); elseif (c <= 4.5e+91) tmp = x * ((18.0 * (t * (y * z))) - (4.0 * i)); else tmp = (b * c) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -6.2e-228], t$95$2, If[LessEqual[c, -5.2e-280], t$95$3, If[LessEqual[c, 4.6e-265], t$95$2, If[LessEqual[c, 2.8e-65], t$95$3, If[LessEqual[c, 72000000000000.0], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.5e+91], 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] + t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;c \leq -6.2 \cdot 10^{-228}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -5.2 \cdot 10^{-280}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq 4.6 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{-65}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq 72000000000000:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;c \leq 4.5 \cdot 10^{+91}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(t \cdot \left(y \cdot z\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if c < -6.1999999999999996e-228 or -5.2e-280 < c < 4.5999999999999998e-265Initial program 85.4%
Simplified88.0%
Taylor expanded in x around -inf 87.0%
Simplified87.0%
Taylor expanded in t around inf 52.4%
if -6.1999999999999996e-228 < c < -5.2e-280 or 4.5999999999999998e-265 < c < 2.8e-65Initial program 92.2%
Simplified94.1%
Taylor expanded in a around inf 72.5%
*-commutative72.5%
Simplified72.5%
if 2.8e-65 < c < 7.2e13Initial program 93.6%
Simplified87.6%
Taylor expanded in i around inf 63.6%
associate-*r*63.6%
*-commutative63.6%
Simplified63.6%
if 7.2e13 < c < 4.5e91Initial program 88.2%
Simplified87.8%
Taylor expanded in x around inf 55.4%
if 4.5e91 < c Initial program 84.2%
Simplified94.2%
Taylor expanded in b around inf 68.4%
Final simplification60.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0)))
(t_2 (* t (+ (* 18.0 (* x (* y z))) (* a -4.0))))
(t_3 (+ t_1 (* -4.0 (* t a)))))
(if (<= c -5e-231)
t_2
(if (<= c -1.5e-281)
t_3
(if (<= c 3.5e-265)
t_2
(if (<= c 5.1e-64)
t_3
(if (<= c 250000000000.0)
(+ t_1 (* x (* i -4.0)))
(if (<= c 5.5e+92)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(+ (* b c) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double t_3 = t_1 + (-4.0 * (t * a));
double tmp;
if (c <= -5e-231) {
tmp = t_2;
} else if (c <= -1.5e-281) {
tmp = t_3;
} else if (c <= 3.5e-265) {
tmp = t_2;
} else if (c <= 5.1e-64) {
tmp = t_3;
} else if (c <= 250000000000.0) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 5.5e+92) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0)))
t_3 = t_1 + ((-4.0d0) * (t * a))
if (c <= (-5d-231)) then
tmp = t_2
else if (c <= (-1.5d-281)) then
tmp = t_3
else if (c <= 3.5d-265) then
tmp = t_2
else if (c <= 5.1d-64) then
tmp = t_3
else if (c <= 250000000000.0d0) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if (c <= 5.5d+92) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else
tmp = (b * c) + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0));
double t_3 = t_1 + (-4.0 * (t * a));
double tmp;
if (c <= -5e-231) {
tmp = t_2;
} else if (c <= -1.5e-281) {
tmp = t_3;
} else if (c <= 3.5e-265) {
tmp = t_2;
} else if (c <= 5.1e-64) {
tmp = t_3;
} else if (c <= 250000000000.0) {
tmp = t_1 + (x * (i * -4.0));
} else if (c <= 5.5e+92) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = (b * c) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0)) t_3 = t_1 + (-4.0 * (t * a)) tmp = 0 if c <= -5e-231: tmp = t_2 elif c <= -1.5e-281: tmp = t_3 elif c <= 3.5e-265: tmp = t_2 elif c <= 5.1e-64: tmp = t_3 elif c <= 250000000000.0: tmp = t_1 + (x * (i * -4.0)) elif c <= 5.5e+92: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) else: tmp = (b * c) + t_1 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 * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0))) t_3 = Float64(t_1 + Float64(-4.0 * Float64(t * a))) tmp = 0.0 if (c <= -5e-231) tmp = t_2; elseif (c <= -1.5e-281) tmp = t_3; elseif (c <= 3.5e-265) tmp = t_2; elseif (c <= 5.1e-64) tmp = t_3; elseif (c <= 250000000000.0) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (c <= 5.5e+92) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); else tmp = Float64(Float64(b * c) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = j * (k * -27.0); t_2 = t * ((18.0 * (x * (y * z))) + (a * -4.0)); t_3 = t_1 + (-4.0 * (t * a)); tmp = 0.0; if (c <= -5e-231) tmp = t_2; elseif (c <= -1.5e-281) tmp = t_3; elseif (c <= 3.5e-265) tmp = t_2; elseif (c <= 5.1e-64) tmp = t_3; elseif (c <= 250000000000.0) tmp = t_1 + (x * (i * -4.0)); elseif (c <= 5.5e+92) tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)); else tmp = (b * c) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -5e-231], t$95$2, If[LessEqual[c, -1.5e-281], t$95$3, If[LessEqual[c, 3.5e-265], t$95$2, If[LessEqual[c, 5.1e-64], t$95$3, If[LessEqual[c, 250000000000.0], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 5.5e+92], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
t_3 := t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;c \leq -5 \cdot 10^{-231}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -1.5 \cdot 10^{-281}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq 3.5 \cdot 10^{-265}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq 5.1 \cdot 10^{-64}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;c \leq 250000000000:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;c \leq 5.5 \cdot 10^{+92}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + t\_1\\
\end{array}
\end{array}
if c < -5.00000000000000023e-231 or -1.49999999999999987e-281 < c < 3.50000000000000015e-265Initial program 85.4%
Simplified88.0%
Taylor expanded in x around -inf 87.0%
Simplified87.0%
Taylor expanded in t around inf 52.4%
if -5.00000000000000023e-231 < c < -1.49999999999999987e-281 or 3.50000000000000015e-265 < c < 5.09999999999999984e-64Initial program 92.2%
Simplified94.1%
Taylor expanded in a around inf 72.5%
*-commutative72.5%
Simplified72.5%
if 5.09999999999999984e-64 < c < 2.5e11Initial program 93.6%
Simplified87.6%
Taylor expanded in i around inf 63.6%
associate-*r*63.6%
*-commutative63.6%
Simplified63.6%
if 2.5e11 < c < 5.50000000000000053e92Initial program 88.7%
Simplified88.3%
Taylor expanded in x around inf 53.2%
expm1-log1p-u32.7%
expm1-udef32.8%
Applied egg-rr32.8%
expm1-def32.7%
expm1-log1p53.2%
*-commutative53.2%
associate-*l*56.9%
Simplified56.9%
if 5.50000000000000053e92 < c Initial program 83.9%
Simplified94.1%
Taylor expanded in b around inf 67.8%
Final simplification60.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= x -9.5e+183)
(not (or (<= x 6.8e-48) (and (not (<= x 0.0205)) (<= x 1.18e+225)))))
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(- (+ (* b c) (* -4.0 (* t a))) (* 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 <= -9.5e+183) || !((x <= 6.8e-48) || (!(x <= 0.0205) && (x <= 1.18e+225)))) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (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 <= (-9.5d+183)) .or. (.not. (x <= 6.8d-48) .or. (.not. (x <= 0.0205d0)) .and. (x <= 1.18d+225))) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (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 <= -9.5e+183) || !((x <= 6.8e-48) || (!(x <= 0.0205) && (x <= 1.18e+225)))) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -9.5e+183) or not ((x <= 6.8e-48) or (not (x <= 0.0205) and (x <= 1.18e+225))): tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) else: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -9.5e+183) || !((x <= 6.8e-48) || (!(x <= 0.0205) && (x <= 1.18e+225)))) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); else tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(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 <= -9.5e+183) || ~(((x <= 6.8e-48) || (~((x <= 0.0205)) && (x <= 1.18e+225))))) tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)); else tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -9.5e+183], N[Not[Or[LessEqual[x, 6.8e-48], And[N[Not[LessEqual[x, 0.0205]], $MachinePrecision], LessEqual[x, 1.18e+225]]]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $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[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+183} \lor \neg \left(x \leq 6.8 \cdot 10^{-48} \lor \neg \left(x \leq 0.0205\right) \land x \leq 1.18 \cdot 10^{+225}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -9.5000000000000003e183 or 6.80000000000000056e-48 < x < 0.0205000000000000009 or 1.17999999999999992e225 < x Initial program 65.4%
Simplified71.3%
Taylor expanded in x around inf 79.0%
expm1-log1p-u59.1%
expm1-udef57.1%
Applied egg-rr57.1%
expm1-def59.1%
expm1-log1p79.0%
*-commutative79.0%
associate-*l*82.7%
Simplified82.7%
if -9.5000000000000003e183 < x < 6.80000000000000056e-48 or 0.0205000000000000009 < x < 1.17999999999999992e225Initial program 92.8%
Simplified93.7%
Taylor expanded in x around 0 75.4%
Final simplification76.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= k -2.6e-29)
(+ (* b c) (* j (* k -27.0)))
(if (<= k 2.9e+180)
(- (+ (* b c) (* t (- (* 18.0 (* x (* y z))) (* a 4.0)))) (* 4.0 (* x i)))
(- (+ (* b c) (* -4.0 (* t a))) (* 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 (k <= -2.6e-29) {
tmp = (b * c) + (j * (k * -27.0));
} else if (k <= 2.9e+180) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (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 (k <= (-2.6d-29)) then
tmp = (b * c) + (j * (k * (-27.0d0)))
else if (k <= 2.9d+180) then
tmp = ((b * c) + (t * ((18.0d0 * (x * (y * z))) - (a * 4.0d0)))) - (4.0d0 * (x * i))
else
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (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 (k <= -2.6e-29) {
tmp = (b * c) + (j * (k * -27.0));
} else if (k <= 2.9e+180) {
tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i));
} else {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -2.6e-29: tmp = (b * c) + (j * (k * -27.0)) elif k <= 2.9e+180: tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)) else: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -2.6e-29) tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); elseif (k <= 2.9e+180) 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(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - 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 (k <= -2.6e-29) tmp = (b * c) + (j * (k * -27.0)); elseif (k <= 2.9e+180) tmp = ((b * c) + (t * ((18.0 * (x * (y * z))) - (a * 4.0)))) - (4.0 * (x * i)); else tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -2.6e-29], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.9e+180], 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[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -2.6 \cdot 10^{-29}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 2.9 \cdot 10^{+180}:\\
\;\;\;\;\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}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if k < -2.6000000000000002e-29Initial program 83.9%
Simplified85.5%
Taylor expanded in b around inf 56.7%
if -2.6000000000000002e-29 < k < 2.90000000000000007e180Initial program 87.8%
Simplified90.2%
Taylor expanded in j around 0 78.9%
if 2.90000000000000007e180 < k Initial program 92.8%
Simplified92.8%
Taylor expanded in x around 0 89.8%
Final simplification74.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= (* b c) -2.6e-59)
t_2
(if (<= (* b c) -1.05e-109)
(* x (* i -4.0))
(if (<= (* b c) 3.5e+128) (+ t_1 (* -4.0 (* t a))) 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 * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if ((b * c) <= -2.6e-59) {
tmp = t_2;
} else if ((b * c) <= -1.05e-109) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 3.5e+128) {
tmp = t_1 + (-4.0 * (t * a));
} 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 * (k * (-27.0d0))
t_2 = (b * c) + t_1
if ((b * c) <= (-2.6d-59)) then
tmp = t_2
else if ((b * c) <= (-1.05d-109)) then
tmp = x * (i * (-4.0d0))
else if ((b * c) <= 3.5d+128) then
tmp = t_1 + ((-4.0d0) * (t * a))
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 * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if ((b * c) <= -2.6e-59) {
tmp = t_2;
} else if ((b * c) <= -1.05e-109) {
tmp = x * (i * -4.0);
} else if ((b * c) <= 3.5e+128) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 tmp = 0 if (b * c) <= -2.6e-59: tmp = t_2 elif (b * c) <= -1.05e-109: tmp = x * (i * -4.0) elif (b * c) <= 3.5e+128: tmp = t_1 + (-4.0 * (t * a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (Float64(b * c) <= -2.6e-59) tmp = t_2; elseif (Float64(b * c) <= -1.05e-109) tmp = Float64(x * Float64(i * -4.0)); elseif (Float64(b * c) <= 3.5e+128) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); 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 * (k * -27.0); t_2 = (b * c) + t_1; tmp = 0.0; if ((b * c) <= -2.6e-59) tmp = t_2; elseif ((b * c) <= -1.05e-109) tmp = x * (i * -4.0); elseif ((b * c) <= 3.5e+128) tmp = t_1 + (-4.0 * (t * a)); 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2.6e-59], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -1.05e-109], N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.5e+128], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
\mathbf{if}\;b \cdot c \leq -2.6 \cdot 10^{-59}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -1.05 \cdot 10^{-109}:\\
\;\;\;\;x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 3.5 \cdot 10^{+128}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -2.59999999999999998e-59 or 3.49999999999999969e128 < (*.f64 b c) Initial program 85.3%
Simplified88.9%
Taylor expanded in b around inf 68.1%
if -2.59999999999999998e-59 < (*.f64 b c) < -1.04999999999999998e-109Initial program 77.8%
Simplified78.1%
Taylor expanded in x around -inf 78.1%
Simplified78.1%
Taylor expanded in i around inf 89.5%
associate-*r*89.5%
*-commutative89.5%
Simplified89.5%
if -1.04999999999999998e-109 < (*.f64 b c) < 3.49999999999999969e128Initial program 89.5%
Simplified92.3%
Taylor expanded in a around inf 61.2%
*-commutative61.2%
Simplified61.2%
Final simplification65.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (+ (* b c) t_1)))
(if (<= (* b c) -5e+54)
t_2
(if (<= (* b c) -8.5e-110)
(+ t_1 (* x (* i -4.0)))
(if (<= (* b c) 2.4e+130) (+ t_1 (* -4.0 (* t a))) 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 * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if ((b * c) <= -5e+54) {
tmp = t_2;
} else if ((b * c) <= -8.5e-110) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 2.4e+130) {
tmp = t_1 + (-4.0 * (t * a));
} 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 * (k * (-27.0d0))
t_2 = (b * c) + t_1
if ((b * c) <= (-5d+54)) then
tmp = t_2
else if ((b * c) <= (-8.5d-110)) then
tmp = t_1 + (x * (i * (-4.0d0)))
else if ((b * c) <= 2.4d+130) then
tmp = t_1 + ((-4.0d0) * (t * a))
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 * (k * -27.0);
double t_2 = (b * c) + t_1;
double tmp;
if ((b * c) <= -5e+54) {
tmp = t_2;
} else if ((b * c) <= -8.5e-110) {
tmp = t_1 + (x * (i * -4.0));
} else if ((b * c) <= 2.4e+130) {
tmp = t_1 + (-4.0 * (t * a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = (b * c) + t_1 tmp = 0 if (b * c) <= -5e+54: tmp = t_2 elif (b * c) <= -8.5e-110: tmp = t_1 + (x * (i * -4.0)) elif (b * c) <= 2.4e+130: tmp = t_1 + (-4.0 * (t * a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) t_2 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (Float64(b * c) <= -5e+54) tmp = t_2; elseif (Float64(b * c) <= -8.5e-110) tmp = Float64(t_1 + Float64(x * Float64(i * -4.0))); elseif (Float64(b * c) <= 2.4e+130) tmp = Float64(t_1 + Float64(-4.0 * Float64(t * a))); 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 * (k * -27.0); t_2 = (b * c) + t_1; tmp = 0.0; if ((b * c) <= -5e+54) tmp = t_2; elseif ((b * c) <= -8.5e-110) tmp = t_1 + (x * (i * -4.0)); elseif ((b * c) <= 2.4e+130) tmp = t_1 + (-4.0 * (t * a)); 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[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -5e+54], t$95$2, If[LessEqual[N[(b * c), $MachinePrecision], -8.5e-110], N[(t$95$1 + N[(x * N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.4e+130], N[(t$95$1 + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := b \cdot c + t\_1\\
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+54}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \cdot c \leq -8.5 \cdot 10^{-110}:\\
\;\;\;\;t\_1 + x \cdot \left(i \cdot -4\right)\\
\mathbf{elif}\;b \cdot c \leq 2.4 \cdot 10^{+130}:\\
\;\;\;\;t\_1 + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 b c) < -5.00000000000000005e54 or 2.40000000000000024e130 < (*.f64 b c) Initial program 83.6%
Simplified88.0%
Taylor expanded in b around inf 71.1%
if -5.00000000000000005e54 < (*.f64 b c) < -8.50000000000000029e-110Initial program 88.4%
Simplified88.4%
Taylor expanded in i around inf 79.5%
associate-*r*79.5%
*-commutative79.5%
Simplified79.5%
if -8.50000000000000029e-110 < (*.f64 b c) < 2.40000000000000024e130Initial program 89.5%
Simplified92.3%
Taylor expanded in a around inf 61.2%
*-commutative61.2%
Simplified61.2%
Final simplification66.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -8.5e+183)
(* x (- (* 18.0 (* y (* z t))) (* 4.0 i)))
(if (<= x 5.4e-114)
(- (+ (* b c) (* -4.0 (* t a))) (* 27.0 (* j k)))
(+ (* j (* k -27.0)) (* t (+ (* 18.0 (* x (* y z))) (* a -4.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8.5e+183) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (x <= 5.4e-114) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (x <= (-8.5d+183)) then
tmp = x * ((18.0d0 * (y * (z * t))) - (4.0d0 * i))
else if (x <= 5.4d-114) then
tmp = ((b * c) + ((-4.0d0) * (t * a))) - (27.0d0 * (j * k))
else
tmp = (j * (k * (-27.0d0))) + (t * ((18.0d0 * (x * (y * z))) + (a * (-4.0d0))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -8.5e+183) {
tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i));
} else if (x <= 5.4e-114) {
tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k));
} else {
tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if x <= -8.5e+183: tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)) elif x <= 5.4e-114: tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)) else: tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -8.5e+183) tmp = Float64(x * Float64(Float64(18.0 * Float64(y * Float64(z * t))) - Float64(4.0 * i))); elseif (x <= 5.4e-114) tmp = Float64(Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(j * Float64(k * -27.0)) + Float64(t * Float64(Float64(18.0 * Float64(x * Float64(y * z))) + Float64(a * -4.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (x <= -8.5e+183) tmp = x * ((18.0 * (y * (z * t))) - (4.0 * i)); elseif (x <= 5.4e-114) tmp = ((b * c) + (-4.0 * (t * a))) - (27.0 * (j * k)); else tmp = (j * (k * -27.0)) + (t * ((18.0 * (x * (y * z))) + (a * -4.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -8.5e+183], N[(x * N[(N[(18.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.4e-114], N[(N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+183}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(y \cdot \left(z \cdot t\right)\right) - 4 \cdot i\right)\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-114}:\\
\;\;\;\;\left(b \cdot c + -4 \cdot \left(t \cdot a\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right) + t \cdot \left(18 \cdot \left(x \cdot \left(y \cdot z\right)\right) + a \cdot -4\right)\\
\end{array}
\end{array}
if x < -8.5000000000000004e183Initial program 67.7%
Simplified76.1%
Taylor expanded in x around inf 79.9%
expm1-log1p-u66.7%
expm1-udef66.5%
Applied egg-rr66.5%
expm1-def66.7%
expm1-log1p79.9%
*-commutative79.9%
associate-*l*83.7%
Simplified83.7%
if -8.5000000000000004e183 < x < 5.3999999999999999e-114Initial program 93.0%
Simplified92.3%
Taylor expanded in x around 0 78.0%
if 5.3999999999999999e-114 < x Initial program 83.6%
Simplified91.3%
Taylor expanded in t around inf 68.9%
Final simplification75.3%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= (* b c) -1.95e+305) (not (<= (* b c) 3.95e+62))) (* 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 (((b * c) <= -1.95e+305) || !((b * c) <= 3.95e+62)) {
tmp = b * c;
} else {
tmp = -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 (((b * c) <= (-1.95d+305)) .or. (.not. ((b * c) <= 3.95d+62))) then
tmp = b * c
else
tmp = (-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 (((b * c) <= -1.95e+305) || !((b * c) <= 3.95e+62)) {
tmp = b * c;
} else {
tmp = -27.0 * (j * k);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if ((b * c) <= -1.95e+305) or not ((b * c) <= 3.95e+62): tmp = b * c else: tmp = -27.0 * (j * k) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((Float64(b * c) <= -1.95e+305) || !(Float64(b * c) <= 3.95e+62)) tmp = Float64(b * c); else tmp = 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 (((b * c) <= -1.95e+305) || ~(((b * c) <= 3.95e+62))) tmp = b * c; else tmp = -27.0 * (j * k); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[N[(b * c), $MachinePrecision], -1.95e+305], N[Not[LessEqual[N[(b * c), $MachinePrecision], 3.95e+62]], $MachinePrecision]], N[(b * c), $MachinePrecision], N[(-27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.95 \cdot 10^{+305} \lor \neg \left(b \cdot c \leq 3.95 \cdot 10^{+62}\right):\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;-27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.95e305 or 3.9499999999999998e62 < (*.f64 b c) Initial program 83.1%
Simplified87.3%
Taylor expanded in x around -inf 82.9%
Simplified85.7%
Taylor expanded in b around inf 67.0%
if -1.95e305 < (*.f64 b c) < 3.9499999999999998e62Initial program 88.9%
Simplified91.6%
Taylor expanded in j around inf 30.2%
Final simplification40.3%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= a -2.85e+113) (not (<= a 6.6e+34))) (+ (* b c) (* -4.0 (* t a))) (+ (* 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 ((a <= -2.85e+113) || !(a <= 6.6e+34)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (b * c) + (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 ((a <= (-2.85d+113)) .or. (.not. (a <= 6.6d+34))) then
tmp = (b * c) + ((-4.0d0) * (t * a))
else
tmp = (b * c) + (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 ((a <= -2.85e+113) || !(a <= 6.6e+34)) {
tmp = (b * c) + (-4.0 * (t * a));
} else {
tmp = (b * c) + (j * (k * -27.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (a <= -2.85e+113) or not (a <= 6.6e+34): tmp = (b * c) + (-4.0 * (t * a)) else: tmp = (b * c) + (j * (k * -27.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((a <= -2.85e+113) || !(a <= 6.6e+34)) tmp = Float64(Float64(b * c) + Float64(-4.0 * Float64(t * a))); else tmp = Float64(Float64(b * c) + Float64(j * Float64(k * -27.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((a <= -2.85e+113) || ~((a <= 6.6e+34))) tmp = (b * c) + (-4.0 * (t * a)); else tmp = (b * c) + (j * (k * -27.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[a, -2.85e+113], N[Not[LessEqual[a, 6.6e+34]], $MachinePrecision]], N[(N[(b * c), $MachinePrecision] + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.85 \cdot 10^{+113} \lor \neg \left(a \leq 6.6 \cdot 10^{+34}\right):\\
\;\;\;\;b \cdot c + -4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c + j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if a < -2.8499999999999999e113 or 6.59999999999999976e34 < a Initial program 82.7%
Simplified86.3%
Taylor expanded in x around 0 73.2%
associate--l+73.2%
*-commutative73.2%
associate-*r*73.2%
fma-def75.1%
*-commutative75.1%
*-commutative75.1%
Applied egg-rr75.1%
Taylor expanded in k around 0 64.3%
if -2.8499999999999999e113 < a < 6.59999999999999976e34Initial program 90.8%
Simplified92.0%
Taylor expanded in b around inf 56.3%
Final simplification59.7%
(FPCore (x y z t a b c i j k) :precision binary64 (* b c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
def code(x, y, z, t, a, b, c, i, j, k): return b * c
function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = b * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
\\
b \cdot c
\end{array}
Initial program 87.3%
Simplified90.4%
Taylor expanded in x around -inf 88.0%
Simplified88.8%
Taylor expanded in b around inf 23.7%
Final simplification23.7%
(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 2024040
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:herbie-target
(if (< t -1.6210815397541398e-69) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b))) (if (< t 165.68027943805222) (+ (- (* (* 18.0 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4.0)) (- (* c b) (* 27.0 (* k j)))) (- (- (* (* 18.0 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4.0)) (- (* (* k j) 27.0) (* c b)))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))