
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))))
(if (<= t_1 INFINITY) t_1 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x 18) y) z) t) (*.f64 (*.f64 a 4) t)) (*.f64 b c)) (*.f64 (*.f64 x 4) i)) (*.f64 (*.f64 j 27) k)) < +inf.0Initial program 96.7%
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.2%
Taylor expanded in x around inf 77.8%
*-commutative77.8%
cancel-sign-sub-inv77.8%
metadata-eval77.8%
associate-*r*78.0%
*-commutative78.0%
Simplified78.0%
Final simplification95.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= y -7.8e+171)
(-
(- (+ (* b c) (* 18.0 (* y (* t (* x z))))) (* 4.0 (* t a)))
(* (* j 27.0) k))
(-
(+ (* b c) (* t (- (* (* x 18.0) (* y z)) (* a 4.0))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -7.8e+171) {
tmp = (((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (y <= (-7.8d+171)) then
tmp = (((b * c) + (18.0d0 * (y * (t * (x * z))))) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else
tmp = ((b * c) + (t * (((x * 18.0d0) * (y * z)) - (a * 4.0d0)))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (y <= -7.8e+171) {
tmp = (((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else {
tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if y <= -7.8e+171: tmp = (((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (t * a))) - ((j * 27.0) * k) else: tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (y <= -7.8e+171) tmp = Float64(Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(y * Float64(t * Float64(x * z))))) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); else 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)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (y <= -7.8e+171) tmp = (((b * c) + (18.0 * (y * (t * (x * z))))) - (4.0 * (t * a))) - ((j * 27.0) * k); else tmp = ((b * c) + (t * (((x * 18.0) * (y * z)) - (a * 4.0)))) - ((x * (4.0 * i)) + (j * (27.0 * k))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[y, -7.8e+171], N[(N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.8 \cdot 10^{+171}:\\
\;\;\;\;\left(\left(b \cdot c + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\end{array}
\end{array}
if y < -7.8e171Initial program 74.5%
Taylor expanded in i around 0 90.2%
if -7.8e171 < y Initial program 92.0%
Simplified93.3%
Final simplification92.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (or (<= t -1.8e-91) (not (<= t 6.8e-76)))
(- (+ (* b c) (* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))) (* 27.0 (* j k)))
(-
(+ (* b c) (* 18.0 (* y (* t (* x z)))))
(+ (* x (* 4.0 i)) (* j (* 27.0 k))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.8e-91) || !(t <= 6.8e-76)) {
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
} else {
tmp = ((b * c) + (18.0 * (y * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-1.8d-91)) .or. (.not. (t <= 6.8d-76))) then
tmp = ((b * c) + (t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0))))) - (27.0d0 * (j * k))
else
tmp = ((b * c) + (18.0d0 * (y * (t * (x * z))))) - ((x * (4.0d0 * i)) + (j * (27.0d0 * k)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -1.8e-91) || !(t <= 6.8e-76)) {
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
} else {
tmp = ((b * c) + (18.0 * (y * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -1.8e-91) or not (t <= 6.8e-76): tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k)) else: tmp = ((b * c) + (18.0 * (y * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k))) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -1.8e-91) || !(t <= 6.8e-76)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0)))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(b * c) + Float64(18.0 * Float64(y * Float64(t * Float64(x * z))))) - Float64(Float64(x * Float64(4.0 * i)) + Float64(j * Float64(27.0 * k)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((t <= -1.8e-91) || ~((t <= 6.8e-76))) tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k)); else tmp = ((b * c) + (18.0 * (y * (t * (x * z))))) - ((x * (4.0 * i)) + (j * (27.0 * k))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -1.8e-91], N[Not[LessEqual[t, 6.8e-76]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] + N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(4.0 * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.8 \cdot 10^{-91} \lor \neg \left(t \leq 6.8 \cdot 10^{-76}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c + 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\right) - \left(x \cdot \left(4 \cdot i\right) + j \cdot \left(27 \cdot k\right)\right)\\
\end{array}
\end{array}
if t < -1.8e-91 or 6.7999999999999998e-76 < t Initial program 92.3%
associate--l-92.3%
associate-+l-92.3%
Simplified93.7%
Taylor expanded in i around 0 89.9%
if -1.8e-91 < t < 6.7999999999999998e-76Initial program 86.2%
Simplified87.2%
Taylor expanded in a around 0 87.2%
Final simplification88.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (+ (* 18.0 (* y (* x z))) (* a -4.0))))
(t_2 (* (* j 27.0) k))
(t_3 (- (- (* b c) (* 4.0 (* x i))) t_2))
(t_4 (+ (* b c) t_1)))
(if (<= t -2.9e-5)
t_4
(if (<= t -8.4e-94)
(- (- (* 18.0 (* y (* t (* x z)))) (* 4.0 (* t a))) t_2)
(if (<= t 1.5e-61)
t_3
(if (<= t 4.9e-26)
(- t_1 (* 27.0 (* j k)))
(if (<= t 1.15e+103) t_3 t_4)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double t_2 = (j * 27.0) * k;
double t_3 = ((b * c) - (4.0 * (x * i))) - t_2;
double t_4 = (b * c) + t_1;
double tmp;
if (t <= -2.9e-5) {
tmp = t_4;
} else if (t <= -8.4e-94) {
tmp = ((18.0 * (y * (t * (x * z)))) - (4.0 * (t * a))) - t_2;
} else if (t <= 1.5e-61) {
tmp = t_3;
} else if (t <= 4.9e-26) {
tmp = t_1 - (27.0 * (j * k));
} else if (t <= 1.15e+103) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
t_2 = (j * 27.0d0) * k
t_3 = ((b * c) - (4.0d0 * (x * i))) - t_2
t_4 = (b * c) + t_1
if (t <= (-2.9d-5)) then
tmp = t_4
else if (t <= (-8.4d-94)) then
tmp = ((18.0d0 * (y * (t * (x * z)))) - (4.0d0 * (t * a))) - t_2
else if (t <= 1.5d-61) then
tmp = t_3
else if (t <= 4.9d-26) then
tmp = t_1 - (27.0d0 * (j * k))
else if (t <= 1.15d+103) then
tmp = t_3
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double t_2 = (j * 27.0) * k;
double t_3 = ((b * c) - (4.0 * (x * i))) - t_2;
double t_4 = (b * c) + t_1;
double tmp;
if (t <= -2.9e-5) {
tmp = t_4;
} else if (t <= -8.4e-94) {
tmp = ((18.0 * (y * (t * (x * z)))) - (4.0 * (t * a))) - t_2;
} else if (t <= 1.5e-61) {
tmp = t_3;
} else if (t <= 4.9e-26) {
tmp = t_1 - (27.0 * (j * k));
} else if (t <= 1.15e+103) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0)) t_2 = (j * 27.0) * k t_3 = ((b * c) - (4.0 * (x * i))) - t_2 t_4 = (b * c) + t_1 tmp = 0 if t <= -2.9e-5: tmp = t_4 elif t <= -8.4e-94: tmp = ((18.0 * (y * (t * (x * z)))) - (4.0 * (t * a))) - t_2 elif t <= 1.5e-61: tmp = t_3 elif t <= 4.9e-26: tmp = t_1 - (27.0 * (j * k)) elif t <= 1.15e+103: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))) t_2 = Float64(Float64(j * 27.0) * k) t_3 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_2) t_4 = Float64(Float64(b * c) + t_1) tmp = 0.0 if (t <= -2.9e-5) tmp = t_4; elseif (t <= -8.4e-94) tmp = Float64(Float64(Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) - Float64(4.0 * Float64(t * a))) - t_2); elseif (t <= 1.5e-61) tmp = t_3; elseif (t <= 4.9e-26) tmp = Float64(t_1 - Float64(27.0 * Float64(j * k))); elseif (t <= 1.15e+103) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0)); t_2 = (j * 27.0) * k; t_3 = ((b * c) - (4.0 * (x * i))) - t_2; t_4 = (b * c) + t_1; tmp = 0.0; if (t <= -2.9e-5) tmp = t_4; elseif (t <= -8.4e-94) tmp = ((18.0 * (y * (t * (x * z)))) - (4.0 * (t * a))) - t_2; elseif (t <= 1.5e-61) tmp = t_3; elseif (t <= 4.9e-26) tmp = t_1 - (27.0 * (j * k)); elseif (t <= 1.15e+103) tmp = t_3; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(b * c), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[t, -2.9e-5], t$95$4, If[LessEqual[t, -8.4e-94], N[(N[(N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$2), $MachinePrecision], If[LessEqual[t, 1.5e-61], t$95$3, If[LessEqual[t, 4.9e-26], N[(t$95$1 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+103], t$95$3, t$95$4]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
t_3 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_2\\
t_4 := b \cdot c + t_1\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{-5}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t \leq -8.4 \cdot 10^{-94}:\\
\;\;\;\;\left(18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) - 4 \cdot \left(t \cdot a\right)\right) - t_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-61}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{-26}:\\
\;\;\;\;t_1 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+103}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
if t < -2.9e-5 or 1.15000000000000004e103 < t Initial program 90.7%
associate--l-90.7%
associate-+l-90.7%
Simplified93.7%
Taylor expanded in i around 0 92.0%
Taylor expanded in k around 0 86.0%
if -2.9e-5 < t < -8.4000000000000004e-94Initial program 85.7%
Taylor expanded in i around 0 84.9%
Taylor expanded in c around 0 84.7%
if -8.4000000000000004e-94 < t < 1.50000000000000006e-61 or 4.8999999999999999e-26 < t < 1.15000000000000004e103Initial program 89.2%
Taylor expanded in t around 0 85.6%
if 1.50000000000000006e-61 < t < 4.8999999999999999e-26Initial program 100.0%
associate--l-100.0%
associate-+l-100.0%
Simplified100.0%
Taylor expanded in i around 0 100.0%
Taylor expanded in c around 0 99.1%
Final simplification86.2%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= t -7.8e-95) (not (<= t 6e-76))) (- (+ (* b c) (* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))) (* 27.0 (* j k))) (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -7.8e-95) || !(t <= 6e-76)) {
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((t <= (-7.8d-95)) .or. (.not. (t <= 6d-76))) then
tmp = ((b * c) + (t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0))))) - (27.0d0 * (j * k))
else
tmp = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((t <= -7.8e-95) || !(t <= 6e-76)) {
tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k));
} else {
tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (t <= -7.8e-95) or not (t <= 6e-76): tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k)) else: tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((t <= -7.8e-95) || !(t <= 6e-76)) tmp = Float64(Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0)))) - Float64(27.0 * Float64(j * k))); else tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((t <= -7.8e-95) || ~((t <= 6e-76))) tmp = ((b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)))) - (27.0 * (j * k)); else tmp = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[t, -7.8e-95], N[Not[LessEqual[t, 6e-76]], $MachinePrecision]], N[(N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.8 \cdot 10^{-95} \lor \neg \left(t \leq 6 \cdot 10^{-76}\right):\\
\;\;\;\;\left(b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if t < -7.8e-95 or 6.00000000000000048e-76 < t Initial program 92.3%
associate--l-92.3%
associate-+l-92.3%
Simplified93.7%
Taylor expanded in i around 0 89.9%
if -7.8e-95 < t < 6.00000000000000048e-76Initial program 86.2%
Taylor expanded in t around 0 86.3%
Final simplification88.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (+ (* 18.0 (* z (* y t))) (* i -4.0)))))
(if (<= x -4.5e+208)
t_1
(if (<= x -4.9e+89)
(- (* 18.0 (* y (* t (* x z)))) (* 27.0 (* j k)))
(if (<= x -5.5e+45)
t_1
(if (<= x 8.5e+55)
(- (- (* b c) (* 4.0 (* t a))) (* (* j 27.0) k))
(if (or (<= x 4.5e+128) (not (<= x 1e+194)))
t_1
(+ (* k (* j -27.0)) (* -4.0 (* x i))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -4.5e+208) {
tmp = t_1;
} else if (x <= -4.9e+89) {
tmp = (18.0 * (y * (t * (x * z)))) - (27.0 * (j * k));
} else if (x <= -5.5e+45) {
tmp = t_1;
} else if (x <= 8.5e+55) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if ((x <= 4.5e+128) || !(x <= 1e+194)) {
tmp = t_1;
} else {
tmp = (k * (j * -27.0)) + (-4.0 * (x * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
if (x <= (-4.5d+208)) then
tmp = t_1
else if (x <= (-4.9d+89)) then
tmp = (18.0d0 * (y * (t * (x * z)))) - (27.0d0 * (j * k))
else if (x <= (-5.5d+45)) then
tmp = t_1
else if (x <= 8.5d+55) then
tmp = ((b * c) - (4.0d0 * (t * a))) - ((j * 27.0d0) * k)
else if ((x <= 4.5d+128) .or. (.not. (x <= 1d+194))) then
tmp = t_1
else
tmp = (k * (j * (-27.0d0))) + ((-4.0d0) * (x * i))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = x * ((18.0 * (z * (y * t))) + (i * -4.0));
double tmp;
if (x <= -4.5e+208) {
tmp = t_1;
} else if (x <= -4.9e+89) {
tmp = (18.0 * (y * (t * (x * z)))) - (27.0 * (j * k));
} else if (x <= -5.5e+45) {
tmp = t_1;
} else if (x <= 8.5e+55) {
tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k);
} else if ((x <= 4.5e+128) || !(x <= 1e+194)) {
tmp = t_1;
} else {
tmp = (k * (j * -27.0)) + (-4.0 * (x * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = x * ((18.0 * (z * (y * t))) + (i * -4.0)) tmp = 0 if x <= -4.5e+208: tmp = t_1 elif x <= -4.9e+89: tmp = (18.0 * (y * (t * (x * z)))) - (27.0 * (j * k)) elif x <= -5.5e+45: tmp = t_1 elif x <= 8.5e+55: tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k) elif (x <= 4.5e+128) or not (x <= 1e+194): tmp = t_1 else: tmp = (k * (j * -27.0)) + (-4.0 * (x * i)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))) tmp = 0.0 if (x <= -4.5e+208) tmp = t_1; elseif (x <= -4.9e+89) tmp = Float64(Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) - Float64(27.0 * Float64(j * k))); elseif (x <= -5.5e+45) tmp = t_1; elseif (x <= 8.5e+55) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - Float64(Float64(j * 27.0) * k)); elseif ((x <= 4.5e+128) || !(x <= 1e+194)) tmp = t_1; else tmp = Float64(Float64(k * Float64(j * -27.0)) + Float64(-4.0 * Float64(x * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = x * ((18.0 * (z * (y * t))) + (i * -4.0)); tmp = 0.0; if (x <= -4.5e+208) tmp = t_1; elseif (x <= -4.9e+89) tmp = (18.0 * (y * (t * (x * z)))) - (27.0 * (j * k)); elseif (x <= -5.5e+45) tmp = t_1; elseif (x <= 8.5e+55) tmp = ((b * c) - (4.0 * (t * a))) - ((j * 27.0) * k); elseif ((x <= 4.5e+128) || ~((x <= 1e+194))) tmp = t_1; else tmp = (k * (j * -27.0)) + (-4.0 * (x * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+208], t$95$1, If[LessEqual[x, -4.9e+89], N[(N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.5e+45], t$95$1, If[LessEqual[x, 8.5e+55], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 4.5e+128], N[Not[LessEqual[x, 1e+194]], $MachinePrecision]], t$95$1, N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+208}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4.9 \cdot 10^{+89}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq -5.5 \cdot 10^{+45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+55}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+128} \lor \neg \left(x \leq 10^{+194}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\end{array}
\end{array}
if x < -4.50000000000000015e208 or -4.89999999999999996e89 < x < -5.5000000000000001e45 or 8.50000000000000002e55 < x < 4.5000000000000001e128 or 9.99999999999999945e193 < x Initial program 74.4%
Simplified83.2%
Taylor expanded in x around inf 80.7%
*-commutative80.7%
cancel-sign-sub-inv80.7%
metadata-eval80.7%
associate-*r*78.0%
*-commutative78.0%
Simplified78.0%
if -4.50000000000000015e208 < x < -4.89999999999999996e89Initial program 89.0%
associate--l-89.0%
associate-+l-89.0%
Simplified89.0%
Taylor expanded in i around 0 82.3%
Taylor expanded in c around 0 78.6%
Taylor expanded in a around 0 71.6%
if -5.5000000000000001e45 < x < 8.50000000000000002e55Initial program 96.6%
Taylor expanded in x around 0 79.6%
if 4.5000000000000001e128 < x < 9.99999999999999945e193Initial program 94.4%
Taylor expanded in t around 0 89.3%
Taylor expanded in c around 0 73.0%
distribute-lft-in73.0%
*-commutative73.0%
neg-mul-173.0%
neg-mul-173.0%
distribute-lft-neg-in73.0%
metadata-eval73.0%
distribute-lft-neg-in73.0%
metadata-eval73.0%
*-commutative73.0%
associate-*r*73.0%
Simplified73.0%
Final simplification77.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)) (t_2 (- (- (* b c) (* 4.0 (* x i))) t_1)))
(if (<= x -7e+177)
t_2
(if (<= x -1.05e+71)
(- (* 18.0 (* y (* t (* x z)))) (* 27.0 (* j k)))
(if (<= x -5.8)
t_2
(if (<= x 0.0115)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= x 3.15e+237)
t_2
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double tmp;
if (x <= -7e+177) {
tmp = t_2;
} else if (x <= -1.05e+71) {
tmp = (18.0 * (y * (t * (x * z)))) - (27.0 * (j * k));
} else if (x <= -5.8) {
tmp = t_2;
} else if (x <= 0.0115) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 3.15e+237) {
tmp = t_2;
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = ((b * c) - (4.0d0 * (x * i))) - t_1
if (x <= (-7d+177)) then
tmp = t_2
else if (x <= (-1.05d+71)) then
tmp = (18.0d0 * (y * (t * (x * z)))) - (27.0d0 * (j * k))
else if (x <= (-5.8d0)) then
tmp = t_2
else if (x <= 0.0115d0) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (x <= 3.15d+237) then
tmp = t_2
else
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double tmp;
if (x <= -7e+177) {
tmp = t_2;
} else if (x <= -1.05e+71) {
tmp = (18.0 * (y * (t * (x * z)))) - (27.0 * (j * k));
} else if (x <= -5.8) {
tmp = t_2;
} else if (x <= 0.0115) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 3.15e+237) {
tmp = t_2;
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = ((b * c) - (4.0 * (x * i))) - t_1 tmp = 0 if x <= -7e+177: tmp = t_2 elif x <= -1.05e+71: tmp = (18.0 * (y * (t * (x * z)))) - (27.0 * (j * k)) elif x <= -5.8: tmp = t_2 elif x <= 0.0115: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif x <= 3.15e+237: tmp = t_2 else: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1) tmp = 0.0 if (x <= -7e+177) tmp = t_2; elseif (x <= -1.05e+71) tmp = Float64(Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) - Float64(27.0 * Float64(j * k))); elseif (x <= -5.8) tmp = t_2; elseif (x <= 0.0115) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (x <= 3.15e+237) tmp = t_2; else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; t_2 = ((b * c) - (4.0 * (x * i))) - t_1; tmp = 0.0; if (x <= -7e+177) tmp = t_2; elseif (x <= -1.05e+71) tmp = (18.0 * (y * (t * (x * z)))) - (27.0 * (j * k)); elseif (x <= -5.8) tmp = t_2; elseif (x <= 0.0115) tmp = ((b * c) - (4.0 * (t * a))) - t_1; elseif (x <= 3.15e+237) tmp = t_2; else tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[x, -7e+177], t$95$2, If[LessEqual[x, -1.05e+71], N[(N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.8], t$95$2, If[LessEqual[x, 0.0115], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 3.15e+237], t$95$2, N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\
\mathbf{if}\;x \leq -7 \cdot 10^{+177}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.05 \cdot 10^{+71}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;x \leq -5.8:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 0.0115:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{elif}\;x \leq 3.15 \cdot 10^{+237}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if x < -6.99999999999999983e177 or -1.04999999999999995e71 < x < -5.79999999999999982 or 0.0115 < x < 3.15000000000000004e237Initial program 88.3%
Taylor expanded in t around 0 74.8%
if -6.99999999999999983e177 < x < -1.04999999999999995e71Initial program 85.9%
associate--l-85.9%
associate-+l-85.9%
Simplified85.9%
Taylor expanded in i around 0 86.8%
Taylor expanded in c around 0 91.3%
Taylor expanded in a around 0 91.0%
if -5.79999999999999982 < x < 0.0115Initial program 96.9%
Taylor expanded in x around 0 82.7%
if 3.15000000000000004e237 < x Initial program 50.0%
Simplified62.5%
Taylor expanded in x around inf 93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
metadata-eval93.8%
associate-*r*94.0%
*-commutative94.0%
Simplified94.0%
Final simplification81.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)) (t_2 (- (- (* b c) (* 4.0 (* x i))) t_1)))
(if (<= x -2.45e+178)
t_2
(if (<= x -8e+70)
(- (* 18.0 (* y (* t (* x z)))) (* j (* 27.0 k)))
(if (<= x -1.6)
t_2
(if (<= x 0.01)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= x 3.6e+237)
t_2
(* x (+ (* 18.0 (* z (* y t))) (* i -4.0))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double tmp;
if (x <= -2.45e+178) {
tmp = t_2;
} else if (x <= -8e+70) {
tmp = (18.0 * (y * (t * (x * z)))) - (j * (27.0 * k));
} else if (x <= -1.6) {
tmp = t_2;
} else if (x <= 0.01) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 3.6e+237) {
tmp = t_2;
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = ((b * c) - (4.0d0 * (x * i))) - t_1
if (x <= (-2.45d+178)) then
tmp = t_2
else if (x <= (-8d+70)) then
tmp = (18.0d0 * (y * (t * (x * z)))) - (j * (27.0d0 * k))
else if (x <= (-1.6d0)) then
tmp = t_2
else if (x <= 0.01d0) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (x <= 3.6d+237) then
tmp = t_2
else
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double tmp;
if (x <= -2.45e+178) {
tmp = t_2;
} else if (x <= -8e+70) {
tmp = (18.0 * (y * (t * (x * z)))) - (j * (27.0 * k));
} else if (x <= -1.6) {
tmp = t_2;
} else if (x <= 0.01) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (x <= 3.6e+237) {
tmp = t_2;
} else {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = ((b * c) - (4.0 * (x * i))) - t_1 tmp = 0 if x <= -2.45e+178: tmp = t_2 elif x <= -8e+70: tmp = (18.0 * (y * (t * (x * z)))) - (j * (27.0 * k)) elif x <= -1.6: tmp = t_2 elif x <= 0.01: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif x <= 3.6e+237: tmp = t_2 else: tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1) tmp = 0.0 if (x <= -2.45e+178) tmp = t_2; elseif (x <= -8e+70) tmp = Float64(Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))) - Float64(j * Float64(27.0 * k))); elseif (x <= -1.6) tmp = t_2; elseif (x <= 0.01) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (x <= 3.6e+237) tmp = t_2; else tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; t_2 = ((b * c) - (4.0 * (x * i))) - t_1; tmp = 0.0; if (x <= -2.45e+178) tmp = t_2; elseif (x <= -8e+70) tmp = (18.0 * (y * (t * (x * z)))) - (j * (27.0 * k)); elseif (x <= -1.6) tmp = t_2; elseif (x <= 0.01) tmp = ((b * c) - (4.0 * (t * a))) - t_1; elseif (x <= 3.6e+237) tmp = t_2; else tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, If[LessEqual[x, -2.45e+178], t$95$2, If[LessEqual[x, -8e+70], N[(N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(j * N[(27.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.6], t$95$2, If[LessEqual[x, 0.01], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[x, 3.6e+237], t$95$2, N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\
\mathbf{if}\;x \leq -2.45 \cdot 10^{+178}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -8 \cdot 10^{+70}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right) - j \cdot \left(27 \cdot k\right)\\
\mathbf{elif}\;x \leq -1.6:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 0.01:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{+237}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\end{array}
\end{array}
if x < -2.4500000000000001e178 or -8.00000000000000058e70 < x < -1.6000000000000001 or 0.0100000000000000002 < x < 3.60000000000000015e237Initial program 88.3%
Taylor expanded in t around 0 74.8%
if -2.4500000000000001e178 < x < -8.00000000000000058e70Initial program 85.9%
associate--l-85.9%
associate-+l-85.9%
Simplified85.9%
Taylor expanded in i around 0 86.8%
Taylor expanded in c around 0 91.3%
Taylor expanded in a around 0 91.0%
sub-neg91.0%
associate-*r*91.0%
*-commutative91.0%
Applied egg-rr91.0%
if -1.6000000000000001 < x < 0.0100000000000000002Initial program 96.9%
Taylor expanded in x around 0 82.7%
if 3.60000000000000015e237 < x Initial program 50.0%
Simplified62.5%
Taylor expanded in x around inf 93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
metadata-eval93.8%
associate-*r*94.0%
*-commutative94.0%
Simplified94.0%
Final simplification81.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k))
(t_2 (- (- (* b c) (* 4.0 (* x i))) t_1))
(t_3 (+ (* b c) (* t (+ (* 18.0 (* y (* x z))) (* a -4.0))))))
(if (<= t -3.2e-7)
t_3
(if (<= t 6.8e-76)
t_2
(if (<= t 1.1e-25)
(- (- (* b c) (* 4.0 (* t a))) t_1)
(if (<= t 1.85e+102) t_2 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double t_3 = (b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)));
double tmp;
if (t <= -3.2e-7) {
tmp = t_3;
} else if (t <= 6.8e-76) {
tmp = t_2;
} else if (t <= 1.1e-25) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 1.85e+102) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (j * 27.0d0) * k
t_2 = ((b * c) - (4.0d0 * (x * i))) - t_1
t_3 = (b * c) + (t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0))))
if (t <= (-3.2d-7)) then
tmp = t_3
else if (t <= 6.8d-76) then
tmp = t_2
else if (t <= 1.1d-25) then
tmp = ((b * c) - (4.0d0 * (t * a))) - t_1
else if (t <= 1.85d+102) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double t_2 = ((b * c) - (4.0 * (x * i))) - t_1;
double t_3 = (b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0)));
double tmp;
if (t <= -3.2e-7) {
tmp = t_3;
} else if (t <= 6.8e-76) {
tmp = t_2;
} else if (t <= 1.1e-25) {
tmp = ((b * c) - (4.0 * (t * a))) - t_1;
} else if (t <= 1.85e+102) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (j * 27.0) * k t_2 = ((b * c) - (4.0 * (x * i))) - t_1 t_3 = (b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0))) tmp = 0 if t <= -3.2e-7: tmp = t_3 elif t <= 6.8e-76: tmp = t_2 elif t <= 1.1e-25: tmp = ((b * c) - (4.0 * (t * a))) - t_1 elif t <= 1.85e+102: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) t_2 = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(x * i))) - t_1) t_3 = Float64(Float64(b * c) + Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0)))) tmp = 0.0 if (t <= -3.2e-7) tmp = t_3; elseif (t <= 6.8e-76) tmp = t_2; elseif (t <= 1.1e-25) tmp = Float64(Float64(Float64(b * c) - Float64(4.0 * Float64(t * a))) - t_1); elseif (t <= 1.85e+102) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (j * 27.0) * k; t_2 = ((b * c) - (4.0 * (x * i))) - t_1; t_3 = (b * c) + (t * ((18.0 * (y * (x * z))) + (a * -4.0))); tmp = 0.0; if (t <= -3.2e-7) tmp = t_3; elseif (t <= 6.8e-76) tmp = t_2; elseif (t <= 1.1e-25) tmp = ((b * c) - (4.0 * (t * a))) - t_1; elseif (t <= 1.85e+102) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e-7], t$95$3, If[LessEqual[t, 6.8e-76], t$95$2, If[LessEqual[t, 1.1e-25], N[(N[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t, 1.85e+102], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
t_2 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - t_1\\
t_3 := b \cdot c + t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-7}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-76}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-25}:\\
\;\;\;\;\left(b \cdot c - 4 \cdot \left(t \cdot a\right)\right) - t_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -3.2000000000000001e-7 or 1.85000000000000011e102 < t Initial program 90.9%
associate--l-90.9%
associate-+l-90.9%
Simplified93.8%
Taylor expanded in i around 0 92.2%
Taylor expanded in k around 0 86.3%
if -3.2000000000000001e-7 < t < 6.7999999999999998e-76 or 1.1000000000000001e-25 < t < 1.85000000000000011e102Initial program 88.3%
Taylor expanded in t around 0 81.8%
if 6.7999999999999998e-76 < t < 1.1000000000000001e-25Initial program 100.0%
Taylor expanded in x around 0 85.0%
Final simplification83.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (- (- (* b c) (* 4.0 (* x i))) (* (* j 27.0) k)))
(t_2 (* t (+ (* 18.0 (* y (* x z))) (* a -4.0))))
(t_3 (+ (* b c) t_2)))
(if (<= t -2.4e-7)
t_3
(if (<= t 1.46e-61)
t_1
(if (<= t 4.8e-21)
(- t_2 (* 27.0 (* j k)))
(if (<= t 1.85e+102) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
double t_2 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double t_3 = (b * c) + t_2;
double tmp;
if (t <= -2.4e-7) {
tmp = t_3;
} else if (t <= 1.46e-61) {
tmp = t_1;
} else if (t <= 4.8e-21) {
tmp = t_2 - (27.0 * (j * k));
} else if (t <= 1.85e+102) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = ((b * c) - (4.0d0 * (x * i))) - ((j * 27.0d0) * k)
t_2 = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
t_3 = (b * c) + t_2
if (t <= (-2.4d-7)) then
tmp = t_3
else if (t <= 1.46d-61) then
tmp = t_1
else if (t <= 4.8d-21) then
tmp = t_2 - (27.0d0 * (j * k))
else if (t <= 1.85d+102) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k);
double t_2 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double t_3 = (b * c) + t_2;
double tmp;
if (t <= -2.4e-7) {
tmp = t_3;
} else if (t <= 1.46e-61) {
tmp = t_1;
} else if (t <= 4.8e-21) {
tmp = t_2 - (27.0 * (j * k));
} else if (t <= 1.85e+102) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k) t_2 = t * ((18.0 * (y * (x * z))) + (a * -4.0)) t_3 = (b * c) + t_2 tmp = 0 if t <= -2.4e-7: tmp = t_3 elif t <= 1.46e-61: tmp = t_1 elif t <= 4.8e-21: tmp = t_2 - (27.0 * (j * k)) elif t <= 1.85e+102: 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(Float64(b * c) - Float64(4.0 * Float64(x * i))) - Float64(Float64(j * 27.0) * k)) t_2 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))) t_3 = Float64(Float64(b * c) + t_2) tmp = 0.0 if (t <= -2.4e-7) tmp = t_3; elseif (t <= 1.46e-61) tmp = t_1; elseif (t <= 4.8e-21) tmp = Float64(t_2 - Float64(27.0 * Float64(j * k))); elseif (t <= 1.85e+102) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((b * c) - (4.0 * (x * i))) - ((j * 27.0) * k); t_2 = t * ((18.0 * (y * (x * z))) + (a * -4.0)); t_3 = (b * c) + t_2; tmp = 0.0; if (t <= -2.4e-7) tmp = t_3; elseif (t <= 1.46e-61) tmp = t_1; elseif (t <= 4.8e-21) tmp = t_2 - (27.0 * (j * k)); elseif (t <= 1.85e+102) 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[(N[(b * c), $MachinePrecision] - N[(4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b * c), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[t, -2.4e-7], t$95$3, If[LessEqual[t, 1.46e-61], t$95$1, If[LessEqual[t, 4.8e-21], N[(t$95$2 - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e+102], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot c - 4 \cdot \left(x \cdot i\right)\right) - \left(j \cdot 27\right) \cdot k\\
t_2 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
t_3 := b \cdot c + t_2\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-7}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t \leq 1.46 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-21}:\\
\;\;\;\;t_2 - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{+102}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if t < -2.39999999999999979e-7 or 1.85000000000000011e102 < t Initial program 90.9%
associate--l-90.9%
associate-+l-90.9%
Simplified93.8%
Taylor expanded in i around 0 92.2%
Taylor expanded in k around 0 86.3%
if -2.39999999999999979e-7 < t < 1.46e-61 or 4.7999999999999999e-21 < t < 1.85000000000000011e102Initial program 88.6%
Taylor expanded in t around 0 82.2%
if 1.46e-61 < t < 4.7999999999999999e-21Initial program 100.0%
associate--l-100.0%
associate-+l-100.0%
Simplified100.0%
Taylor expanded in i around 0 100.0%
Taylor expanded in c around 0 99.1%
Final simplification84.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))) (t_2 (* 18.0 (* y (* t (* x z))))))
(if (<= z -4.2e+59)
t_2
(if (<= z -3.5e-118)
(* k (* j -27.0))
(if (<= z -2.25e-212)
t_2
(if (<= z 2.6e-299)
t_1
(if (<= z 1.56e-167)
(* t (* a -4.0))
(if (<= z 2.9e-64)
t_1
(if (<= z 9.2e+114)
(* b c)
(* (* 18.0 y) (* x (* z t))))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = 18.0 * (y * (t * (x * z)));
double tmp;
if (z <= -4.2e+59) {
tmp = t_2;
} else if (z <= -3.5e-118) {
tmp = k * (j * -27.0);
} else if (z <= -2.25e-212) {
tmp = t_2;
} else if (z <= 2.6e-299) {
tmp = t_1;
} else if (z <= 1.56e-167) {
tmp = t * (a * -4.0);
} else if (z <= 2.9e-64) {
tmp = t_1;
} else if (z <= 9.2e+114) {
tmp = b * c;
} else {
tmp = (18.0 * y) * (x * (z * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * (k * (-27.0d0))
t_2 = 18.0d0 * (y * (t * (x * z)))
if (z <= (-4.2d+59)) then
tmp = t_2
else if (z <= (-3.5d-118)) then
tmp = k * (j * (-27.0d0))
else if (z <= (-2.25d-212)) then
tmp = t_2
else if (z <= 2.6d-299) then
tmp = t_1
else if (z <= 1.56d-167) then
tmp = t * (a * (-4.0d0))
else if (z <= 2.9d-64) then
tmp = t_1
else if (z <= 9.2d+114) then
tmp = b * c
else
tmp = (18.0d0 * y) * (x * (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double t_2 = 18.0 * (y * (t * (x * z)));
double tmp;
if (z <= -4.2e+59) {
tmp = t_2;
} else if (z <= -3.5e-118) {
tmp = k * (j * -27.0);
} else if (z <= -2.25e-212) {
tmp = t_2;
} else if (z <= 2.6e-299) {
tmp = t_1;
} else if (z <= 1.56e-167) {
tmp = t * (a * -4.0);
} else if (z <= 2.9e-64) {
tmp = t_1;
} else if (z <= 9.2e+114) {
tmp = b * c;
} else {
tmp = (18.0 * y) * (x * (z * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = j * (k * -27.0) t_2 = 18.0 * (y * (t * (x * z))) tmp = 0 if z <= -4.2e+59: tmp = t_2 elif z <= -3.5e-118: tmp = k * (j * -27.0) elif z <= -2.25e-212: tmp = t_2 elif z <= 2.6e-299: tmp = t_1 elif z <= 1.56e-167: tmp = t * (a * -4.0) elif z <= 2.9e-64: tmp = t_1 elif z <= 9.2e+114: tmp = b * c else: tmp = (18.0 * y) * (x * (z * t)) 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(18.0 * Float64(y * Float64(t * Float64(x * z)))) tmp = 0.0 if (z <= -4.2e+59) tmp = t_2; elseif (z <= -3.5e-118) tmp = Float64(k * Float64(j * -27.0)); elseif (z <= -2.25e-212) tmp = t_2; elseif (z <= 2.6e-299) tmp = t_1; elseif (z <= 1.56e-167) tmp = Float64(t * Float64(a * -4.0)); elseif (z <= 2.9e-64) tmp = t_1; elseif (z <= 9.2e+114) tmp = Float64(b * c); else tmp = Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))); 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 = 18.0 * (y * (t * (x * z))); tmp = 0.0; if (z <= -4.2e+59) tmp = t_2; elseif (z <= -3.5e-118) tmp = k * (j * -27.0); elseif (z <= -2.25e-212) tmp = t_2; elseif (z <= 2.6e-299) tmp = t_1; elseif (z <= 1.56e-167) tmp = t * (a * -4.0); elseif (z <= 2.9e-64) tmp = t_1; elseif (z <= 9.2e+114) tmp = b * c; else tmp = (18.0 * y) * (x * (z * t)); 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[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+59], t$95$2, If[LessEqual[z, -3.5e-118], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.25e-212], t$95$2, If[LessEqual[z, 2.6e-299], t$95$1, If[LessEqual[z, 1.56e-167], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-64], t$95$1, If[LessEqual[z, 9.2e+114], N[(b * c), $MachinePrecision], N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
t_2 := 18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+59}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-118}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;z \leq -2.25 \cdot 10^{-212}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-299}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.56 \cdot 10^{-167}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+114}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if z < -4.19999999999999968e59 or -3.5e-118 < z < -2.2499999999999999e-212Initial program 88.4%
Simplified88.4%
Taylor expanded in y around inf 40.5%
if -4.19999999999999968e59 < z < -3.5e-118Initial program 99.8%
Simplified99.8%
Taylor expanded in j around inf 36.5%
*-commutative36.5%
associate-*l*36.5%
Simplified36.5%
if -2.2499999999999999e-212 < z < 2.5999999999999999e-299 or 1.56000000000000005e-167 < z < 2.8999999999999999e-64Initial program 95.7%
Simplified100.0%
Taylor expanded in j around inf 28.8%
*-commutative28.8%
*-commutative28.8%
associate-*l*28.8%
Simplified28.8%
if 2.5999999999999999e-299 < z < 1.56000000000000005e-167Initial program 86.0%
Simplified99.9%
Taylor expanded in a around inf 33.2%
*-commutative33.2%
*-commutative33.2%
associate-*r*33.2%
Simplified33.2%
if 2.8999999999999999e-64 < z < 9.2000000000000001e114Initial program 93.1%
Simplified88.8%
Taylor expanded in b around inf 25.3%
if 9.2000000000000001e114 < z Initial program 79.4%
Simplified77.0%
Taylor expanded in a around 0 63.1%
Taylor expanded in y around inf 53.3%
associate-*r*53.4%
associate-*r*58.3%
Simplified58.3%
Final simplification37.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (+ (* k (* j -27.0)) (* -4.0 (* x i)))))
(if (<= i -4.8e+69)
t_1
(if (<= i 1.7e-76)
(- (* b c) (* 27.0 (* j k)))
(if (<= i 1.7e-42)
(* t (* a -4.0))
(if (<= i 540000000000.0) (* (* 18.0 y) (* x (* z t))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (k * (j * -27.0)) + (-4.0 * (x * i));
double tmp;
if (i <= -4.8e+69) {
tmp = t_1;
} else if (i <= 1.7e-76) {
tmp = (b * c) - (27.0 * (j * k));
} else if (i <= 1.7e-42) {
tmp = t * (a * -4.0);
} else if (i <= 540000000000.0) {
tmp = (18.0 * y) * (x * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (k * (j * (-27.0d0))) + ((-4.0d0) * (x * i))
if (i <= (-4.8d+69)) then
tmp = t_1
else if (i <= 1.7d-76) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (i <= 1.7d-42) then
tmp = t * (a * (-4.0d0))
else if (i <= 540000000000.0d0) then
tmp = (18.0d0 * y) * (x * (z * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (k * (j * -27.0)) + (-4.0 * (x * i));
double tmp;
if (i <= -4.8e+69) {
tmp = t_1;
} else if (i <= 1.7e-76) {
tmp = (b * c) - (27.0 * (j * k));
} else if (i <= 1.7e-42) {
tmp = t * (a * -4.0);
} else if (i <= 540000000000.0) {
tmp = (18.0 * y) * (x * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = (k * (j * -27.0)) + (-4.0 * (x * i)) tmp = 0 if i <= -4.8e+69: tmp = t_1 elif i <= 1.7e-76: tmp = (b * c) - (27.0 * (j * k)) elif i <= 1.7e-42: tmp = t * (a * -4.0) elif i <= 540000000000.0: tmp = (18.0 * y) * (x * (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(k * Float64(j * -27.0)) + Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (i <= -4.8e+69) tmp = t_1; elseif (i <= 1.7e-76) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (i <= 1.7e-42) tmp = Float64(t * Float64(a * -4.0)); elseif (i <= 540000000000.0) tmp = Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = (k * (j * -27.0)) + (-4.0 * (x * i)); tmp = 0.0; if (i <= -4.8e+69) tmp = t_1; elseif (i <= 1.7e-76) tmp = (b * c) - (27.0 * (j * k)); elseif (i <= 1.7e-42) tmp = t * (a * -4.0); elseif (i <= 540000000000.0) tmp = (18.0 * y) * (x * (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -4.8e+69], t$95$1, If[LessEqual[i, 1.7e-76], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.7e-42], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 540000000000.0], N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -4.8 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 1.7 \cdot 10^{-76}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;i \leq 1.7 \cdot 10^{-42}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;i \leq 540000000000:\\
\;\;\;\;\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if i < -4.8000000000000003e69 or 5.4e11 < i Initial program 87.7%
Taylor expanded in t around 0 66.3%
Taylor expanded in c around 0 58.3%
distribute-lft-in58.3%
*-commutative58.3%
neg-mul-158.3%
neg-mul-158.3%
distribute-lft-neg-in58.3%
metadata-eval58.3%
distribute-lft-neg-in58.3%
metadata-eval58.3%
*-commutative58.3%
associate-*r*58.3%
Simplified58.3%
if -4.8000000000000003e69 < i < 1.7e-76Initial program 91.8%
associate--l-91.8%
associate-+l-91.8%
Simplified93.3%
Taylor expanded in i around 0 90.1%
Taylor expanded in t around 0 63.9%
if 1.7e-76 < i < 1.70000000000000011e-42Initial program 100.0%
Simplified100.0%
Taylor expanded in a around inf 75.4%
*-commutative75.4%
*-commutative75.4%
associate-*r*75.4%
Simplified75.4%
if 1.70000000000000011e-42 < i < 5.4e11Initial program 81.9%
Simplified76.7%
Taylor expanded in a around 0 69.5%
Taylor expanded in y around inf 39.7%
associate-*r*39.7%
associate-*r*39.7%
Simplified39.7%
Final simplification60.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (+ (* 18.0 (* y (* x z))) (* a -4.0)))))
(if (<= t -1.4e-7)
t_1
(if (<= t 4.8e-133)
(+ (* k (* j -27.0)) (* -4.0 (* x i)))
(if (<= t 2.7e+105) (- (* b c) (* 27.0 (* j k))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double tmp;
if (t <= -1.4e-7) {
tmp = t_1;
} else if (t <= 4.8e-133) {
tmp = (k * (j * -27.0)) + (-4.0 * (x * i));
} else if (t <= 2.7e+105) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * ((18.0d0 * (y * (x * z))) + (a * (-4.0d0)))
if (t <= (-1.4d-7)) then
tmp = t_1
else if (t <= 4.8d-133) then
tmp = (k * (j * (-27.0d0))) + ((-4.0d0) * (x * i))
else if (t <= 2.7d+105) then
tmp = (b * c) - (27.0d0 * (j * k))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0));
double tmp;
if (t <= -1.4e-7) {
tmp = t_1;
} else if (t <= 4.8e-133) {
tmp = (k * (j * -27.0)) + (-4.0 * (x * i));
} else if (t <= 2.7e+105) {
tmp = (b * c) - (27.0 * (j * k));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0)) tmp = 0 if t <= -1.4e-7: tmp = t_1 elif t <= 4.8e-133: tmp = (k * (j * -27.0)) + (-4.0 * (x * i)) elif t <= 2.7e+105: tmp = (b * c) - (27.0 * (j * k)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(Float64(18.0 * Float64(y * Float64(x * z))) + Float64(a * -4.0))) tmp = 0.0 if (t <= -1.4e-7) tmp = t_1; elseif (t <= 4.8e-133) tmp = Float64(Float64(k * Float64(j * -27.0)) + Float64(-4.0 * Float64(x * i))); elseif (t <= 2.7e+105) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * ((18.0 * (y * (x * z))) + (a * -4.0)); tmp = 0.0; if (t <= -1.4e-7) tmp = t_1; elseif (t <= 4.8e-133) tmp = (k * (j * -27.0)) + (-4.0 * (x * i)); elseif (t <= 2.7e+105) tmp = (b * c) - (27.0 * (j * k)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(N[(18.0 * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e-7], t$95$1, If[LessEqual[t, 4.8e-133], N[(N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e+105], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(18 \cdot \left(y \cdot \left(x \cdot z\right)\right) + a \cdot -4\right)\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-133}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right) + -4 \cdot \left(x \cdot i\right)\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+105}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.4000000000000001e-7 or 2.70000000000000016e105 < t Initial program 90.9%
associate--l-90.9%
associate-+l-90.9%
Simplified93.8%
Taylor expanded in t around inf 71.6%
if -1.4000000000000001e-7 < t < 4.8e-133Initial program 85.0%
Taylor expanded in t around 0 81.4%
Taylor expanded in c around 0 62.7%
distribute-lft-in62.7%
*-commutative62.7%
neg-mul-162.7%
neg-mul-162.7%
distribute-lft-neg-in62.7%
metadata-eval62.7%
distribute-lft-neg-in62.7%
metadata-eval62.7%
*-commutative62.7%
associate-*r*62.7%
Simplified62.7%
if 4.8e-133 < t < 2.70000000000000016e105Initial program 98.0%
associate--l-98.0%
associate-+l-98.0%
Simplified94.4%
Taylor expanded in i around 0 83.0%
Taylor expanded in t around 0 59.0%
Final simplification65.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= i -3.2e+192)
t_1
(if (<= i 1.7e-76)
(- (* b c) (* 27.0 (* j k)))
(if (<= i 2.5e-43)
(* t (* a -4.0))
(if (<= i 2.05e+14) (* (* 18.0 y) (* x (* z t))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (i <= -3.2e+192) {
tmp = t_1;
} else if (i <= 1.7e-76) {
tmp = (b * c) - (27.0 * (j * k));
} else if (i <= 2.5e-43) {
tmp = t * (a * -4.0);
} else if (i <= 2.05e+14) {
tmp = (18.0 * y) * (x * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if (i <= (-3.2d+192)) then
tmp = t_1
else if (i <= 1.7d-76) then
tmp = (b * c) - (27.0d0 * (j * k))
else if (i <= 2.5d-43) then
tmp = t * (a * (-4.0d0))
else if (i <= 2.05d+14) then
tmp = (18.0d0 * y) * (x * (z * t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (i <= -3.2e+192) {
tmp = t_1;
} else if (i <= 1.7e-76) {
tmp = (b * c) - (27.0 * (j * k));
} else if (i <= 2.5e-43) {
tmp = t * (a * -4.0);
} else if (i <= 2.05e+14) {
tmp = (18.0 * y) * (x * (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (x * i) tmp = 0 if i <= -3.2e+192: tmp = t_1 elif i <= 1.7e-76: tmp = (b * c) - (27.0 * (j * k)) elif i <= 2.5e-43: tmp = t * (a * -4.0) elif i <= 2.05e+14: tmp = (18.0 * y) * (x * (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (i <= -3.2e+192) tmp = t_1; elseif (i <= 1.7e-76) tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); elseif (i <= 2.5e-43) tmp = Float64(t * Float64(a * -4.0)); elseif (i <= 2.05e+14) tmp = Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -4.0 * (x * i); tmp = 0.0; if (i <= -3.2e+192) tmp = t_1; elseif (i <= 1.7e-76) tmp = (b * c) - (27.0 * (j * k)); elseif (i <= 2.5e-43) tmp = t * (a * -4.0); elseif (i <= 2.05e+14) tmp = (18.0 * y) * (x * (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.2e+192], t$95$1, If[LessEqual[i, 1.7e-76], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.5e-43], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.05e+14], N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -3.2 \cdot 10^{+192}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq 1.7 \cdot 10^{-76}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\mathbf{elif}\;i \leq 2.5 \cdot 10^{-43}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{elif}\;i \leq 2.05 \cdot 10^{+14}:\\
\;\;\;\;\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if i < -3.20000000000000023e192 or 2.05e14 < i Initial program 86.8%
Simplified88.2%
Taylor expanded in i around inf 51.3%
*-commutative51.3%
*-commutative51.3%
Simplified51.3%
if -3.20000000000000023e192 < i < 1.7e-76Initial program 91.7%
associate--l-91.7%
associate-+l-91.7%
Simplified93.6%
Taylor expanded in i around 0 89.0%
Taylor expanded in t around 0 60.2%
if 1.7e-76 < i < 2.50000000000000009e-43Initial program 100.0%
Simplified100.0%
Taylor expanded in a around inf 75.4%
*-commutative75.4%
*-commutative75.4%
associate-*r*75.4%
Simplified75.4%
if 2.50000000000000009e-43 < i < 2.05e14Initial program 81.9%
Simplified76.7%
Taylor expanded in a around 0 69.5%
Taylor expanded in y around inf 39.7%
associate-*r*39.7%
associate-*r*39.7%
Simplified39.7%
Final simplification56.8%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= x -1.25e-28) (not (<= x 6.8e+55))) (* x (+ (* 18.0 (* z (* y t))) (* i -4.0))) (- (* b c) (* 27.0 (* j k)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.25e-28) || !(x <= 6.8e+55)) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((x <= (-1.25d-28)) .or. (.not. (x <= 6.8d+55))) then
tmp = x * ((18.0d0 * (z * (y * t))) + (i * (-4.0d0)))
else
tmp = (b * c) - (27.0d0 * (j * k))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((x <= -1.25e-28) || !(x <= 6.8e+55)) {
tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0));
} else {
tmp = (b * c) - (27.0 * (j * k));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (x <= -1.25e-28) or not (x <= 6.8e+55): tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)) else: tmp = (b * c) - (27.0 * (j * k)) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((x <= -1.25e-28) || !(x <= 6.8e+55)) tmp = Float64(x * Float64(Float64(18.0 * Float64(z * Float64(y * t))) + Float64(i * -4.0))); else tmp = Float64(Float64(b * c) - Float64(27.0 * Float64(j * k))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((x <= -1.25e-28) || ~((x <= 6.8e+55))) tmp = x * ((18.0 * (z * (y * t))) + (i * -4.0)); else tmp = (b * c) - (27.0 * (j * k)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[x, -1.25e-28], N[Not[LessEqual[x, 6.8e+55]], $MachinePrecision]], N[(x * N[(N[(18.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(i * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * c), $MachinePrecision] - N[(27.0 * N[(j * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{-28} \lor \neg \left(x \leq 6.8 \cdot 10^{+55}\right):\\
\;\;\;\;x \cdot \left(18 \cdot \left(z \cdot \left(y \cdot t\right)\right) + i \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c - 27 \cdot \left(j \cdot k\right)\\
\end{array}
\end{array}
if x < -1.25e-28 or 6.7999999999999996e55 < x Initial program 83.7%
Simplified89.0%
Taylor expanded in x around inf 63.3%
*-commutative63.3%
cancel-sign-sub-inv63.3%
metadata-eval63.3%
associate-*r*62.6%
*-commutative62.6%
Simplified62.6%
if -1.25e-28 < x < 6.7999999999999996e55Initial program 96.1%
associate--l-96.1%
associate-+l-96.1%
Simplified93.2%
Taylor expanded in i around 0 92.5%
Taylor expanded in t around 0 56.3%
Final simplification59.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= i -8.8e+53)
t_1
(if (<= i -5.2e-115)
(* k (* j -27.0))
(if (<= i -3e-235)
(* b c)
(if (<= i 1.08e-83)
(* (* j k) -27.0)
(if (<= i 2.5e+106) (* t (* a -4.0)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (i <= -8.8e+53) {
tmp = t_1;
} else if (i <= -5.2e-115) {
tmp = k * (j * -27.0);
} else if (i <= -3e-235) {
tmp = b * c;
} else if (i <= 1.08e-83) {
tmp = (j * k) * -27.0;
} else if (i <= 2.5e+106) {
tmp = t * (a * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if (i <= (-8.8d+53)) then
tmp = t_1
else if (i <= (-5.2d-115)) then
tmp = k * (j * (-27.0d0))
else if (i <= (-3d-235)) then
tmp = b * c
else if (i <= 1.08d-83) then
tmp = (j * k) * (-27.0d0)
else if (i <= 2.5d+106) then
tmp = t * (a * (-4.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if (i <= -8.8e+53) {
tmp = t_1;
} else if (i <= -5.2e-115) {
tmp = k * (j * -27.0);
} else if (i <= -3e-235) {
tmp = b * c;
} else if (i <= 1.08e-83) {
tmp = (j * k) * -27.0;
} else if (i <= 2.5e+106) {
tmp = t * (a * -4.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (x * i) tmp = 0 if i <= -8.8e+53: tmp = t_1 elif i <= -5.2e-115: tmp = k * (j * -27.0) elif i <= -3e-235: tmp = b * c elif i <= 1.08e-83: tmp = (j * k) * -27.0 elif i <= 2.5e+106: tmp = t * (a * -4.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (i <= -8.8e+53) tmp = t_1; elseif (i <= -5.2e-115) tmp = Float64(k * Float64(j * -27.0)); elseif (i <= -3e-235) tmp = Float64(b * c); elseif (i <= 1.08e-83) tmp = Float64(Float64(j * k) * -27.0); elseif (i <= 2.5e+106) tmp = Float64(t * Float64(a * -4.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -4.0 * (x * i); tmp = 0.0; if (i <= -8.8e+53) tmp = t_1; elseif (i <= -5.2e-115) tmp = k * (j * -27.0); elseif (i <= -3e-235) tmp = b * c; elseif (i <= 1.08e-83) tmp = (j * k) * -27.0; elseif (i <= 2.5e+106) tmp = t * (a * -4.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -8.8e+53], t$95$1, If[LessEqual[i, -5.2e-115], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -3e-235], N[(b * c), $MachinePrecision], If[LessEqual[i, 1.08e-83], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[i, 2.5e+106], N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;i \leq -8.8 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;i \leq -5.2 \cdot 10^{-115}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;i \leq -3 \cdot 10^{-235}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;i \leq 1.08 \cdot 10^{-83}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;i \leq 2.5 \cdot 10^{+106}:\\
\;\;\;\;t \cdot \left(a \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if i < -8.79999999999999994e53 or 2.4999999999999999e106 < i Initial program 89.3%
Simplified90.5%
Taylor expanded in i around inf 48.9%
*-commutative48.9%
*-commutative48.9%
Simplified48.9%
if -8.79999999999999994e53 < i < -5.20000000000000008e-115Initial program 90.8%
Simplified92.5%
Taylor expanded in j around inf 36.7%
*-commutative36.7%
associate-*l*36.7%
Simplified36.7%
if -5.20000000000000008e-115 < i < -2.9999999999999999e-235Initial program 91.1%
Simplified95.5%
Taylor expanded in b around inf 51.5%
if -2.9999999999999999e-235 < i < 1.08e-83Initial program 92.5%
Simplified94.4%
Taylor expanded in j around inf 38.6%
*-commutative38.6%
Simplified38.6%
if 1.08e-83 < i < 2.4999999999999999e106Initial program 86.0%
Simplified84.0%
Taylor expanded in a around inf 39.4%
*-commutative39.4%
*-commutative39.4%
associate-*r*39.4%
Simplified39.4%
Final simplification42.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= c -6.6e+15)
(* b c)
(if (<= c 3.4e-182)
(* k (* j -27.0))
(if (<= c 4.3e+197) (* 18.0 (* y (* t (* x z)))) (* b c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -6.6e+15) {
tmp = b * c;
} else if (c <= 3.4e-182) {
tmp = k * (j * -27.0);
} else if (c <= 4.3e+197) {
tmp = 18.0 * (y * (t * (x * z)));
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (c <= (-6.6d+15)) then
tmp = b * c
else if (c <= 3.4d-182) then
tmp = k * (j * (-27.0d0))
else if (c <= 4.3d+197) then
tmp = 18.0d0 * (y * (t * (x * z)))
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (c <= -6.6e+15) {
tmp = b * c;
} else if (c <= 3.4e-182) {
tmp = k * (j * -27.0);
} else if (c <= 4.3e+197) {
tmp = 18.0 * (y * (t * (x * z)));
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if c <= -6.6e+15: tmp = b * c elif c <= 3.4e-182: tmp = k * (j * -27.0) elif c <= 4.3e+197: tmp = 18.0 * (y * (t * (x * z))) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (c <= -6.6e+15) tmp = Float64(b * c); elseif (c <= 3.4e-182) tmp = Float64(k * Float64(j * -27.0)); elseif (c <= 4.3e+197) tmp = Float64(18.0 * Float64(y * Float64(t * Float64(x * z)))); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (c <= -6.6e+15) tmp = b * c; elseif (c <= 3.4e-182) tmp = k * (j * -27.0); elseif (c <= 4.3e+197) tmp = 18.0 * (y * (t * (x * z))); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[c, -6.6e+15], N[(b * c), $MachinePrecision], If[LessEqual[c, 3.4e-182], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 4.3e+197], N[(18.0 * N[(y * N[(t * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -6.6 \cdot 10^{+15}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;c \leq 3.4 \cdot 10^{-182}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;c \leq 4.3 \cdot 10^{+197}:\\
\;\;\;\;18 \cdot \left(y \cdot \left(t \cdot \left(x \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if c < -6.6e15 or 4.29999999999999996e197 < c Initial program 91.0%
Simplified92.2%
Taylor expanded in b around inf 42.0%
if -6.6e15 < c < 3.39999999999999989e-182Initial program 88.0%
Simplified90.1%
Taylor expanded in j around inf 33.8%
*-commutative33.8%
associate-*l*33.8%
Simplified33.8%
if 3.39999999999999989e-182 < c < 4.29999999999999996e197Initial program 91.3%
Simplified91.2%
Taylor expanded in y around inf 27.8%
Final simplification34.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (* a -4.0))))
(if (<= a -1.35e+150)
t_1
(if (<= a -1.42e-178)
(* b c)
(if (<= a 1.7e+61) (* k (* j -27.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if (a <= -1.35e+150) {
tmp = t_1;
} else if (a <= -1.42e-178) {
tmp = b * c;
} else if (a <= 1.7e+61) {
tmp = k * (j * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = t * (a * (-4.0d0))
if (a <= (-1.35d+150)) then
tmp = t_1
else if (a <= (-1.42d-178)) then
tmp = b * c
else if (a <= 1.7d+61) then
tmp = k * (j * (-27.0d0))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = t * (a * -4.0);
double tmp;
if (a <= -1.35e+150) {
tmp = t_1;
} else if (a <= -1.42e-178) {
tmp = b * c;
} else if (a <= 1.7e+61) {
tmp = k * (j * -27.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = t * (a * -4.0) tmp = 0 if a <= -1.35e+150: tmp = t_1 elif a <= -1.42e-178: tmp = b * c elif a <= 1.7e+61: tmp = k * (j * -27.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * Float64(a * -4.0)) tmp = 0.0 if (a <= -1.35e+150) tmp = t_1; elseif (a <= -1.42e-178) tmp = Float64(b * c); elseif (a <= 1.7e+61) tmp = Float64(k * Float64(j * -27.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = t * (a * -4.0); tmp = 0.0; if (a <= -1.35e+150) tmp = t_1; elseif (a <= -1.42e-178) tmp = b * c; elseif (a <= 1.7e+61) tmp = k * (j * -27.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(a * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.35e+150], t$95$1, If[LessEqual[a, -1.42e-178], N[(b * c), $MachinePrecision], If[LessEqual[a, 1.7e+61], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(a \cdot -4\right)\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.42 \cdot 10^{-178}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+61}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.35000000000000004e150 or 1.70000000000000013e61 < a Initial program 82.8%
Simplified85.5%
Taylor expanded in a around inf 53.7%
*-commutative53.7%
*-commutative53.7%
associate-*r*53.7%
Simplified53.7%
if -1.35000000000000004e150 < a < -1.4200000000000001e-178Initial program 94.4%
Simplified93.0%
Taylor expanded in b around inf 36.4%
if -1.4200000000000001e-178 < a < 1.70000000000000013e61Initial program 92.3%
Simplified94.1%
Taylor expanded in j around inf 32.7%
*-commutative32.7%
associate-*l*32.7%
Simplified32.7%
Final simplification40.3%
(FPCore (x y z t a b c i j k) :precision binary64 (if (or (<= k -1.65e-74) (not (<= k 2e-36))) (* j (* k -27.0)) (* b c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -1.65e-74) || !(k <= 2e-36)) {
tmp = j * (k * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((k <= (-1.65d-74)) .or. (.not. (k <= 2d-36))) then
tmp = j * (k * (-27.0d0))
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((k <= -1.65e-74) || !(k <= 2e-36)) {
tmp = j * (k * -27.0);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (k <= -1.65e-74) or not (k <= 2e-36): tmp = j * (k * -27.0) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if ((k <= -1.65e-74) || !(k <= 2e-36)) tmp = Float64(j * Float64(k * -27.0)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((k <= -1.65e-74) || ~((k <= 2e-36))) tmp = j * (k * -27.0); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[Or[LessEqual[k, -1.65e-74], N[Not[LessEqual[k, 2e-36]], $MachinePrecision]], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -1.65 \cdot 10^{-74} \lor \neg \left(k \leq 2 \cdot 10^{-36}\right):\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if k < -1.64999999999999998e-74 or 1.9999999999999999e-36 < k Initial program 89.8%
Simplified90.5%
Taylor expanded in j around inf 34.6%
*-commutative34.6%
*-commutative34.6%
associate-*l*34.6%
Simplified34.6%
if -1.64999999999999998e-74 < k < 1.9999999999999999e-36Initial program 90.1%
Simplified92.1%
Taylor expanded in b around inf 27.6%
Final simplification31.8%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= k -8e-73) (* j (* k -27.0)) (if (<= k 1.45e-37) (* b c) (* k (* j -27.0)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -8e-73) {
tmp = j * (k * -27.0);
} else if (k <= 1.45e-37) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if (k <= (-8d-73)) then
tmp = j * (k * (-27.0d0))
else if (k <= 1.45d-37) then
tmp = b * c
else
tmp = k * (j * (-27.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (k <= -8e-73) {
tmp = j * (k * -27.0);
} else if (k <= 1.45e-37) {
tmp = b * c;
} else {
tmp = k * (j * -27.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if k <= -8e-73: tmp = j * (k * -27.0) elif k <= 1.45e-37: tmp = b * c else: tmp = k * (j * -27.0) return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (k <= -8e-73) tmp = Float64(j * Float64(k * -27.0)); elseif (k <= 1.45e-37) tmp = Float64(b * c); else tmp = Float64(k * Float64(j * -27.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if (k <= -8e-73) tmp = j * (k * -27.0); elseif (k <= 1.45e-37) tmp = b * c; else tmp = k * (j * -27.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[k, -8e-73], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.45e-37], N[(b * c), $MachinePrecision], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;k \leq -8 \cdot 10^{-73}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;k \leq 1.45 \cdot 10^{-37}:\\
\;\;\;\;b \cdot c\\
\mathbf{else}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\end{array}
\end{array}
if k < -7.99999999999999998e-73Initial program 88.6%
Simplified88.7%
Taylor expanded in j around inf 39.1%
*-commutative39.1%
*-commutative39.1%
associate-*l*39.0%
Simplified39.0%
if -7.99999999999999998e-73 < k < 1.45000000000000002e-37Initial program 90.1%
Simplified92.1%
Taylor expanded in b around inf 27.6%
if 1.45000000000000002e-37 < k Initial program 91.6%
Simplified93.3%
Taylor expanded in j around inf 27.4%
*-commutative27.4%
associate-*l*27.4%
Simplified27.4%
Final simplification31.8%
(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 89.9%
Simplified91.1%
Taylor expanded in b around inf 23.6%
Final simplification23.6%
(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 2023274
(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)))