
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j k) :precision binary64 (- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = (((((((x * 18.0d0) * y) * z) * t) - ((a * 4.0d0) * t)) + (b * c)) - ((x * 4.0d0) * i)) - ((j * 27.0d0) * k)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k);
}
def code(x, y, z, t, a, b, c, i, j, k): return (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)
function code(x, y, z, t, a, b, c, i, j, k) return Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(Float64(a * 4.0) * t)) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = (((((((x * 18.0) * y) * z) * t) - ((a * 4.0) * t)) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(N[(a * 4.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - \left(a \cdot 4\right) \cdot t\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k
\end{array}
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* 18.0 (* y z))))
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
(* (* j 27.0) k))
INFINITY)
(fma
(* j k)
-27.0
(fma x (* i -4.0) (fma t (fma x t_1 (* a -4.0)) (* b c))))
(* x (fma -4.0 i (* 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 = 18.0 * (y * z);
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - ((j * 27.0) * k)) <= ((double) INFINITY)) {
tmp = fma((j * k), -27.0, fma(x, (i * -4.0), fma(t, fma(x, t_1, (a * -4.0)), (b * c))));
} else {
tmp = x * fma(-4.0, i, (t * t_1));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(18.0 * Float64(y * z)) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(Float64(Float64(x * 18.0) * y) * z) * t) - Float64(t * Float64(a * 4.0))) + Float64(b * c)) - Float64(Float64(x * 4.0) * i)) - Float64(Float64(j * 27.0) * k)) <= Inf) tmp = fma(Float64(j * k), -27.0, fma(x, Float64(i * -4.0), fma(t, fma(x, t_1, Float64(a * -4.0)), Float64(b * c)))); else tmp = Float64(x * fma(-4.0, i, Float64(t * t_1))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(N[(N[(N[(N[(x * 18.0), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision] - N[(t * N[(a * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision] - N[(N[(x * 4.0), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(x * N[(i * -4.0), $MachinePrecision] + N[(t * N[(x * t$95$1 + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 18 \cdot \left(y \cdot z\right)\\
\mathbf{if}\;\left(\left(\left(\left(\left(\left(x \cdot 18\right) \cdot y\right) \cdot z\right) \cdot t - t \cdot \left(a \cdot 4\right)\right) + b \cdot c\right) - \left(x \cdot 4\right) \cdot i\right) - \left(j \cdot 27\right) \cdot k \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(x, i \cdot -4, \mathsf{fma}\left(t, \mathsf{fma}\left(x, t\_1, a \cdot -4\right), b \cdot c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot t\_1\right)\\
\end{array}
\end{array}
if (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) < +inf.0Initial program 97.9%
Applied rewrites97.8%
if +inf.0 < (-.f64 (-.f64 (+.f64 (-.f64 (*.f64 (*.f64 (*.f64 (*.f64 x #s(literal 18 binary64)) y) z) t) (*.f64 (*.f64 a #s(literal 4 binary64)) t)) (*.f64 b c)) (*.f64 (*.f64 x #s(literal 4 binary64)) i)) (*.f64 (*.f64 j #s(literal 27 binary64)) k)) Initial program 0.0%
Taylor expanded in x around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6470.9
Applied rewrites70.9%
Final simplification95.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= (* b c) -3.3e+193)
(* b c)
(if (<= (* b c) -2.1e-22)
t_1
(if (<= (* b c) -2.25e-132)
(* -4.0 (* t a))
(if (<= (* b c) 4.8e-308)
t_1
(if (<= (* b c) 1.14e+79)
(* j (* k -27.0))
(if (<= (* b c) 6.5e+162) t_1 (* b c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -3.3e+193) {
tmp = b * c;
} else if ((b * c) <= -2.1e-22) {
tmp = t_1;
} else if ((b * c) <= -2.25e-132) {
tmp = -4.0 * (t * a);
} else if ((b * c) <= 4.8e-308) {
tmp = t_1;
} else if ((b * c) <= 1.14e+79) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 6.5e+162) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if ((b * c) <= (-3.3d+193)) then
tmp = b * c
else if ((b * c) <= (-2.1d-22)) then
tmp = t_1
else if ((b * c) <= (-2.25d-132)) then
tmp = (-4.0d0) * (t * a)
else if ((b * c) <= 4.8d-308) then
tmp = t_1
else if ((b * c) <= 1.14d+79) then
tmp = j * (k * (-27.0d0))
else if ((b * c) <= 6.5d+162) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -3.3e+193) {
tmp = b * c;
} else if ((b * c) <= -2.1e-22) {
tmp = t_1;
} else if ((b * c) <= -2.25e-132) {
tmp = -4.0 * (t * a);
} else if ((b * c) <= 4.8e-308) {
tmp = t_1;
} else if ((b * c) <= 1.14e+79) {
tmp = j * (k * -27.0);
} else if ((b * c) <= 6.5e+162) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (x * i) tmp = 0 if (b * c) <= -3.3e+193: tmp = b * c elif (b * c) <= -2.1e-22: tmp = t_1 elif (b * c) <= -2.25e-132: tmp = -4.0 * (t * a) elif (b * c) <= 4.8e-308: tmp = t_1 elif (b * c) <= 1.14e+79: tmp = j * (k * -27.0) elif (b * c) <= 6.5e+162: tmp = t_1 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -3.3e+193) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.1e-22) tmp = t_1; elseif (Float64(b * c) <= -2.25e-132) tmp = Float64(-4.0 * Float64(t * a)); elseif (Float64(b * c) <= 4.8e-308) tmp = t_1; elseif (Float64(b * c) <= 1.14e+79) tmp = Float64(j * Float64(k * -27.0)); elseif (Float64(b * c) <= 6.5e+162) tmp = t_1; else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -4.0 * (x * i); tmp = 0.0; if ((b * c) <= -3.3e+193) tmp = b * c; elseif ((b * c) <= -2.1e-22) tmp = t_1; elseif ((b * c) <= -2.25e-132) tmp = -4.0 * (t * a); elseif ((b * c) <= 4.8e-308) tmp = t_1; elseif ((b * c) <= 1.14e+79) tmp = j * (k * -27.0); elseif ((b * c) <= 6.5e+162) tmp = t_1; else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.3e+193], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.1e-22], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2.25e-132], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.8e-308], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1.14e+79], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.5e+162], t$95$1, N[(b * c), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -3.3 \cdot 10^{+193}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.1 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -2.25 \cdot 10^{-132}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 4.8 \cdot 10^{-308}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 1.14 \cdot 10^{+79}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\mathbf{elif}\;b \cdot c \leq 6.5 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.3e193 or 6.5000000000000004e162 < (*.f64 b c) Initial program 79.5%
Taylor expanded in b around inf
lower-*.f6472.6
Applied rewrites72.6%
if -3.3e193 < (*.f64 b c) < -2.10000000000000008e-22 or -2.25e-132 < (*.f64 b c) < 4.80000000000000016e-308 or 1.13999999999999997e79 < (*.f64 b c) < 6.5000000000000004e162Initial program 89.4%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6442.3
Applied rewrites42.3%
if -2.10000000000000008e-22 < (*.f64 b c) < -2.25e-132Initial program 93.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6441.1
Applied rewrites41.1%
if 4.80000000000000016e-308 < (*.f64 b c) < 1.13999999999999997e79Initial program 94.8%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6436.1
Applied rewrites36.1%
Final simplification48.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma b c (fma -4.0 (* t a) (* j (* k -27.0))))))
(if (<= (* b c) -1e+195)
t_1
(if (<= (* b c) 2e+74)
(fma (* j k) -27.0 (fma x (* i -4.0) (* a (* t -4.0))))
(if (<= (* b c) 1e+152)
(* x (fma -4.0 i (* t (* 18.0 (* y z)))))
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 = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
double tmp;
if ((b * c) <= -1e+195) {
tmp = t_1;
} else if ((b * c) <= 2e+74) {
tmp = fma((j * k), -27.0, fma(x, (i * -4.0), (a * (t * -4.0))));
} else if ((b * c) <= 1e+152) {
tmp = x * fma(-4.0, i, (t * (18.0 * (y * z))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))) tmp = 0.0 if (Float64(b * c) <= -1e+195) tmp = t_1; elseif (Float64(b * c) <= 2e+74) tmp = fma(Float64(j * k), -27.0, fma(x, Float64(i * -4.0), Float64(a * Float64(t * -4.0)))); elseif (Float64(b * c) <= 1e+152) tmp = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+195], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 2e+74], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(x * N[(i * -4.0), $MachinePrecision] + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1e+152], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+74}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(x, i \cdot -4, a \cdot \left(t \cdot -4\right)\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 10^{+152}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -9.99999999999999977e194 or 1e152 < (*.f64 b c) Initial program 80.1%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6489.6
Applied rewrites89.6%
if -9.99999999999999977e194 < (*.f64 b c) < 1.9999999999999999e74Initial program 91.1%
Applied rewrites96.0%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6473.5
Applied rewrites73.5%
if 1.9999999999999999e74 < (*.f64 b c) < 1e152Initial program 99.9%
Taylor expanded in x around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6499.9
Applied rewrites99.9%
Final simplification78.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* x i))))
(if (<= (* b c) -3.3e+193)
(* b c)
(if (<= (* b c) -2.1e-22)
t_1
(if (<= (* b c) -2.25e-132)
(* -4.0 (* t a))
(if (<= (* b c) 6.5e+162) t_1 (* b c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -3.3e+193) {
tmp = b * c;
} else if ((b * c) <= -2.1e-22) {
tmp = t_1;
} else if ((b * c) <= -2.25e-132) {
tmp = -4.0 * (t * a);
} else if ((b * c) <= 6.5e+162) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = (-4.0d0) * (x * i)
if ((b * c) <= (-3.3d+193)) then
tmp = b * c
else if ((b * c) <= (-2.1d-22)) then
tmp = t_1
else if ((b * c) <= (-2.25d-132)) then
tmp = (-4.0d0) * (t * a)
else if ((b * c) <= 6.5d+162) then
tmp = t_1
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = -4.0 * (x * i);
double tmp;
if ((b * c) <= -3.3e+193) {
tmp = b * c;
} else if ((b * c) <= -2.1e-22) {
tmp = t_1;
} else if ((b * c) <= -2.25e-132) {
tmp = -4.0 * (t * a);
} else if ((b * c) <= 6.5e+162) {
tmp = t_1;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = -4.0 * (x * i) tmp = 0 if (b * c) <= -3.3e+193: tmp = b * c elif (b * c) <= -2.1e-22: tmp = t_1 elif (b * c) <= -2.25e-132: tmp = -4.0 * (t * a) elif (b * c) <= 6.5e+162: tmp = t_1 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(x * i)) tmp = 0.0 if (Float64(b * c) <= -3.3e+193) tmp = Float64(b * c); elseif (Float64(b * c) <= -2.1e-22) tmp = t_1; elseif (Float64(b * c) <= -2.25e-132) tmp = Float64(-4.0 * Float64(t * a)); elseif (Float64(b * c) <= 6.5e+162) tmp = t_1; else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = -4.0 * (x * i); tmp = 0.0; if ((b * c) <= -3.3e+193) tmp = b * c; elseif ((b * c) <= -2.1e-22) tmp = t_1; elseif ((b * c) <= -2.25e-132) tmp = -4.0 * (t * a); elseif ((b * c) <= 6.5e+162) tmp = t_1; else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -3.3e+193], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -2.1e-22], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], -2.25e-132], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 6.5e+162], t$95$1, N[(b * c), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(x \cdot i\right)\\
\mathbf{if}\;b \cdot c \leq -3.3 \cdot 10^{+193}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -2.1 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq -2.25 \cdot 10^{-132}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{elif}\;b \cdot c \leq 6.5 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.3e193 or 6.5000000000000004e162 < (*.f64 b c) Initial program 79.5%
Taylor expanded in b around inf
lower-*.f6472.6
Applied rewrites72.6%
if -3.3e193 < (*.f64 b c) < -2.10000000000000008e-22 or -2.25e-132 < (*.f64 b c) < 6.5000000000000004e162Initial program 91.4%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6432.8
Applied rewrites32.8%
if -2.10000000000000008e-22 < (*.f64 b c) < -2.25e-132Initial program 93.4%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6441.1
Applied rewrites41.1%
Final simplification43.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= z 3.2e+74)
(fma b c (fma -4.0 (fma a t (* x i)) t_1))
(fma x (fma -4.0 i (* t (* 18.0 (* y z)))) (fma b c t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (z <= 3.2e+74) {
tmp = fma(b, c, fma(-4.0, fma(a, t, (x * i)), t_1));
} else {
tmp = fma(x, fma(-4.0, i, (t * (18.0 * (y * z)))), fma(b, c, t_1));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (z <= 3.2e+74) tmp = fma(b, c, fma(-4.0, fma(a, t, Float64(x * i)), t_1)); else tmp = fma(x, fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z)))), fma(b, c, t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 3.2e+74], N[(b * c + N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * c + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;z \leq 3.2 \cdot 10^{+74}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, \mathsf{fma}\left(a, t, x \cdot i\right), t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right), \mathsf{fma}\left(b, c, t\_1\right)\right)\\
\end{array}
\end{array}
if z < 3.19999999999999995e74Initial program 89.7%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6485.8
Applied rewrites85.8%
if 3.19999999999999995e74 < z Initial program 83.6%
Taylor expanded in a around 0
associate--r+N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
associate-+r+N/A
associate--l+N/A
Applied rewrites79.1%
Final simplification84.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -200000000000.0)
(- (* b c) t_1)
(if (<= t_1 1e+93)
(* -4.0 (fma a t (* x i)))
(fma (* 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 t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -200000000000.0) {
tmp = (b * c) - t_1;
} else if (t_1 <= 1e+93) {
tmp = -4.0 * fma(a, t, (x * i));
} else {
tmp = fma((j * k), -27.0, (b * c));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -200000000000.0) tmp = Float64(Float64(b * c) - t_1); elseif (t_1 <= 1e+93) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); else tmp = fma(Float64(j * k), -27.0, Float64(b * c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -200000000000.0], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 1e+93], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(b * c), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -200000000000:\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{elif}\;t\_1 \leq 10^{+93}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, b \cdot c\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2e11Initial program 85.4%
Taylor expanded in b around inf
lower-*.f6460.6
Applied rewrites60.6%
if -2e11 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e93Initial program 89.0%
Applied rewrites94.1%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6459.7
Applied rewrites59.7%
Taylor expanded in k around 0
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6
Applied rewrites55.6%
if 1.00000000000000004e93 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 92.6%
Applied rewrites92.6%
Taylor expanded in b around inf
lower-*.f6471.8
Applied rewrites71.8%
Final simplification59.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (* j k) -27.0 (* b c))) (t_2 (* (* j 27.0) k)))
(if (<= t_2 -200000000000.0)
t_1
(if (<= t_2 1e+93) (* -4.0 (fma a t (* x i))) 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 = fma((j * k), -27.0, (b * c));
double t_2 = (j * 27.0) * k;
double tmp;
if (t_2 <= -200000000000.0) {
tmp = t_1;
} else if (t_2 <= 1e+93) {
tmp = -4.0 * fma(a, t, (x * i));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(j * k), -27.0, Float64(b * c)) t_2 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_2 <= -200000000000.0) tmp = t_1; elseif (t_2 <= 1e+93) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * k), $MachinePrecision] * -27.0 + N[(b * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$2, -200000000000.0], t$95$1, If[LessEqual[t$95$2, 1e+93], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j \cdot k, -27, b \cdot c\right)\\
t_2 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_2 \leq -200000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+93}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2e11 or 1.00000000000000004e93 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 88.2%
Applied rewrites91.2%
Taylor expanded in b around inf
lower-*.f6464.9
Applied rewrites64.9%
if -2e11 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 1.00000000000000004e93Initial program 89.0%
Applied rewrites94.1%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6459.7
Applied rewrites59.7%
Taylor expanded in k around 0
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6455.6
Applied rewrites55.6%
Final simplification59.3%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -2e+47)
(* k (* j -27.0))
(if (<= t_1 2e+243) (* -4.0 (fma a t (* x i))) (* j (* k -27.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = (j * 27.0) * k;
double tmp;
if (t_1 <= -2e+47) {
tmp = k * (j * -27.0);
} else if (t_1 <= 2e+243) {
tmp = -4.0 * fma(a, t, (x * i));
} else {
tmp = j * (k * -27.0);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(j * 27.0) * k) tmp = 0.0 if (t_1 <= -2e+47) tmp = Float64(k * Float64(j * -27.0)); elseif (t_1 <= 2e+243) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); else tmp = Float64(j * Float64(k * -27.0)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+47], N[(k * N[(j * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+243], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+47}:\\
\;\;\;\;k \cdot \left(j \cdot -27\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+243}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(k \cdot -27\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -2.0000000000000001e47Initial program 85.5%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6454.3
Applied rewrites54.3%
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6454.3
Applied rewrites54.3%
if -2.0000000000000001e47 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.0000000000000001e243Initial program 89.3%
Applied rewrites94.1%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6459.4
Applied rewrites59.4%
Taylor expanded in k around 0
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6453.2
Applied rewrites53.2%
if 2.0000000000000001e243 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 90.7%
Taylor expanded in j around inf
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6491.0
Applied rewrites91.0%
Final simplification56.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -2.3e+18)
(* t (fma -4.0 a (* 18.0 (* x (* y z)))))
(if (<= t 1.85e-150)
(fma (* j -27.0) k (* i (* x -4.0)))
(if (<= t 1.15e+36)
(fma b c (* a (* t -4.0)))
(* t (fma x (* 18.0 (* y z)) (* a -4.0)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= -2.3e+18) {
tmp = t * fma(-4.0, a, (18.0 * (x * (y * z))));
} else if (t <= 1.85e-150) {
tmp = fma((j * -27.0), k, (i * (x * -4.0)));
} else if (t <= 1.15e+36) {
tmp = fma(b, c, (a * (t * -4.0)));
} else {
tmp = t * fma(x, (18.0 * (y * z)), (a * -4.0));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -2.3e+18) tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))); elseif (t <= 1.85e-150) tmp = fma(Float64(j * -27.0), k, Float64(i * Float64(x * -4.0))); elseif (t <= 1.15e+36) tmp = fma(b, c, Float64(a * Float64(t * -4.0))); else tmp = Float64(t * fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -2.3e+18], N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.85e-150], N[(N[(j * -27.0), $MachinePrecision] * k + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+36], N[(b * c + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{+18}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-150}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, i \cdot \left(x \cdot -4\right)\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(b, c, a \cdot \left(t \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right)\\
\end{array}
\end{array}
if t < -2.3e18Initial program 84.7%
Taylor expanded in t around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6459.2
Applied rewrites59.2%
if -2.3e18 < t < 1.85e-150Initial program 90.3%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.1
Applied rewrites70.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
cancel-sign-sub-invN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6470.1
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.1
Applied rewrites70.1%
if 1.85e-150 < t < 1.14999999999999998e36Initial program 89.2%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.3
Applied rewrites65.3%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6458.3
Applied rewrites58.3%
if 1.14999999999999998e36 < t Initial program 89.5%
Applied rewrites97.0%
Taylor expanded in t around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6469.5
Applied rewrites69.5%
Final simplification66.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* t (fma -4.0 a (* 18.0 (* x (* y z)))))))
(if (<= t -2.3e+18)
t_1
(if (<= t 1.85e-150)
(fma (* j -27.0) k (* i (* x -4.0)))
(if (<= t 1.15e+36) (fma b c (* a (* t -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 = t * fma(-4.0, a, (18.0 * (x * (y * z))));
double tmp;
if (t <= -2.3e+18) {
tmp = t_1;
} else if (t <= 1.85e-150) {
tmp = fma((j * -27.0), k, (i * (x * -4.0)));
} else if (t <= 1.15e+36) {
tmp = fma(b, c, (a * (t * -4.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))) tmp = 0.0 if (t <= -2.3e+18) tmp = t_1; elseif (t <= 1.85e-150) tmp = fma(Float64(j * -27.0), k, Float64(i * Float64(x * -4.0))); elseif (t <= 1.15e+36) tmp = fma(b, c, Float64(a * Float64(t * -4.0))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+18], t$95$1, If[LessEqual[t, 1.85e-150], N[(N[(j * -27.0), $MachinePrecision] * k + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+36], N[(b * c + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.85 \cdot 10^{-150}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot -27, k, i \cdot \left(x \cdot -4\right)\right)\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(b, c, a \cdot \left(t \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.3e18 or 1.14999999999999998e36 < t Initial program 87.3%
Taylor expanded in t around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6464.7
Applied rewrites64.7%
if -2.3e18 < t < 1.85e-150Initial program 90.3%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.1
Applied rewrites70.1%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
cancel-sign-sub-invN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6470.1
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6470.1
Applied rewrites70.1%
if 1.85e-150 < t < 1.14999999999999998e36Initial program 89.2%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.3
Applied rewrites65.3%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6458.3
Applied rewrites58.3%
Final simplification66.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= i -56000000000000.0)
(fma (* x -4.0) i (* (* j k) -27.0))
(if (<= i 3.5e+122)
(fma b c (fma -4.0 (* t a) (* j (* k -27.0))))
(* i (fma -27.0 (/ (* j k) i) (* x -4.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (i <= -56000000000000.0) {
tmp = fma((x * -4.0), i, ((j * k) * -27.0));
} else if (i <= 3.5e+122) {
tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = i * fma(-27.0, ((j * k) / i), (x * -4.0));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (i <= -56000000000000.0) tmp = fma(Float64(x * -4.0), i, Float64(Float64(j * k) * -27.0)); elseif (i <= 3.5e+122) tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.0)))); else tmp = Float64(i * fma(-27.0, Float64(Float64(j * k) / i), Float64(x * -4.0))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[i, -56000000000000.0], N[(N[(x * -4.0), $MachinePrecision] * i + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.5e+122], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(-27.0 * N[(N[(j * k), $MachinePrecision] / i), $MachinePrecision] + N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -56000000000000:\\
\;\;\;\;\mathsf{fma}\left(x \cdot -4, i, \left(j \cdot k\right) \cdot -27\right)\\
\mathbf{elif}\;i \leq 3.5 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \mathsf{fma}\left(-27, \frac{j \cdot k}{i}, x \cdot -4\right)\\
\end{array}
\end{array}
if i < -5.6e13Initial program 82.2%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6473.8
Applied rewrites73.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
cancel-sign-sub-invN/A
lift-*.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6473.8
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6473.8
Applied rewrites73.8%
if -5.6e13 < i < 3.50000000000000014e122Initial program 93.0%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6473.7
Applied rewrites73.7%
if 3.50000000000000014e122 < i Initial program 80.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6466.7
Applied rewrites66.7%
Taylor expanded in i around inf
lower-*.f64N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-*.f64N/A
lower-*.f6471.6
Applied rewrites71.6%
Final simplification73.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (* x -4.0) i (* j (* k -27.0)))))
(if (<= i -1.9e-28)
t_1
(if (<= i 2.2e-225)
(fma (* j k) -27.0 (* b c))
(if (<= i 5.2e+121) (fma b c (* a (* t -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 = fma((x * -4.0), i, (j * (k * -27.0)));
double tmp;
if (i <= -1.9e-28) {
tmp = t_1;
} else if (i <= 2.2e-225) {
tmp = fma((j * k), -27.0, (b * c));
} else if (i <= 5.2e+121) {
tmp = fma(b, c, (a * (t * -4.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(x * -4.0), i, Float64(j * Float64(k * -27.0))) tmp = 0.0 if (i <= -1.9e-28) tmp = t_1; elseif (i <= 2.2e-225) tmp = fma(Float64(j * k), -27.0, Float64(b * c)); elseif (i <= 5.2e+121) tmp = fma(b, c, Float64(a * Float64(t * -4.0))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(x * -4.0), $MachinePrecision] * i + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.9e-28], t$95$1, If[LessEqual[i, 2.2e-225], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 5.2e+121], N[(b * c + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x \cdot -4, i, j \cdot \left(k \cdot -27\right)\right)\\
\mathbf{if}\;i \leq -1.9 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 2.2 \cdot 10^{-225}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, b \cdot c\right)\\
\mathbf{elif}\;i \leq 5.2 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(b, c, a \cdot \left(t \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.90000000000000005e-28 or 5.1999999999999998e121 < i Initial program 83.3%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6469.0
Applied rewrites69.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
cancel-sign-sub-invN/A
lift-*.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6470.9
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6470.9
Applied rewrites70.9%
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6470.9
Applied rewrites70.9%
if -1.90000000000000005e-28 < i < 2.2e-225Initial program 93.3%
Applied rewrites94.7%
Taylor expanded in b around inf
lower-*.f6453.7
Applied rewrites53.7%
if 2.2e-225 < i < 5.1999999999999998e121Initial program 91.8%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6478.9
Applied rewrites78.9%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.7
Applied rewrites62.7%
Final simplification63.5%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma (* j -27.0) k (* i (* x -4.0)))))
(if (<= i -1.9e-28)
t_1
(if (<= i 2.2e-225)
(fma (* j k) -27.0 (* b c))
(if (<= i 5.2e+121) (fma b c (* a (* t -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 = fma((j * -27.0), k, (i * (x * -4.0)));
double tmp;
if (i <= -1.9e-28) {
tmp = t_1;
} else if (i <= 2.2e-225) {
tmp = fma((j * k), -27.0, (b * c));
} else if (i <= 5.2e+121) {
tmp = fma(b, c, (a * (t * -4.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(Float64(j * -27.0), k, Float64(i * Float64(x * -4.0))) tmp = 0.0 if (i <= -1.9e-28) tmp = t_1; elseif (i <= 2.2e-225) tmp = fma(Float64(j * k), -27.0, Float64(b * c)); elseif (i <= 5.2e+121) tmp = fma(b, c, Float64(a * Float64(t * -4.0))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(j * -27.0), $MachinePrecision] * k + N[(i * N[(x * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.9e-28], t$95$1, If[LessEqual[i, 2.2e-225], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(b * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 5.2e+121], N[(b * c + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(j \cdot -27, k, i \cdot \left(x \cdot -4\right)\right)\\
\mathbf{if}\;i \leq -1.9 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 2.2 \cdot 10^{-225}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, b \cdot c\right)\\
\mathbf{elif}\;i \leq 5.2 \cdot 10^{+121}:\\
\;\;\;\;\mathsf{fma}\left(b, c, a \cdot \left(t \cdot -4\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.90000000000000005e-28 or 5.1999999999999998e121 < i Initial program 83.3%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6469.0
Applied rewrites69.0%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
cancel-sign-sub-invN/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6469.0
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6469.0
Applied rewrites69.0%
if -1.90000000000000005e-28 < i < 2.2e-225Initial program 93.3%
Applied rewrites94.7%
Taylor expanded in b around inf
lower-*.f6453.7
Applied rewrites53.7%
if 2.2e-225 < i < 5.1999999999999998e121Initial program 91.8%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6478.9
Applied rewrites78.9%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6462.7
Applied rewrites62.7%
Final simplification62.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* j (* k -27.0))))
(if (<= i -56000000000000.0)
(fma (* x -4.0) i (* (* j k) -27.0))
(if (<= i 3.5e+122)
(fma b c (fma -4.0 (* t a) t_1))
(fma (* x -4.0) i t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = j * (k * -27.0);
double tmp;
if (i <= -56000000000000.0) {
tmp = fma((x * -4.0), i, ((j * k) * -27.0));
} else if (i <= 3.5e+122) {
tmp = fma(b, c, fma(-4.0, (t * a), t_1));
} else {
tmp = fma((x * -4.0), i, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(j * Float64(k * -27.0)) tmp = 0.0 if (i <= -56000000000000.0) tmp = fma(Float64(x * -4.0), i, Float64(Float64(j * k) * -27.0)); elseif (i <= 3.5e+122) tmp = fma(b, c, fma(-4.0, Float64(t * a), t_1)); else tmp = fma(Float64(x * -4.0), i, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -56000000000000.0], N[(N[(x * -4.0), $MachinePrecision] * i + N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.5e+122], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x * -4.0), $MachinePrecision] * i + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(k \cdot -27\right)\\
\mathbf{if}\;i \leq -56000000000000:\\
\;\;\;\;\mathsf{fma}\left(x \cdot -4, i, \left(j \cdot k\right) \cdot -27\right)\\
\mathbf{elif}\;i \leq 3.5 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x \cdot -4, i, t\_1\right)\\
\end{array}
\end{array}
if i < -5.6e13Initial program 82.2%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6473.8
Applied rewrites73.8%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
cancel-sign-sub-invN/A
lift-*.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6473.8
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6473.8
Applied rewrites73.8%
if -5.6e13 < i < 3.50000000000000014e122Initial program 93.0%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6473.7
Applied rewrites73.7%
if 3.50000000000000014e122 < i Initial program 80.7%
Taylor expanded in i around inf
lower-*.f64N/A
*-commutativeN/A
lower-*.f6466.7
Applied rewrites66.7%
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
cancel-sign-sub-invN/A
lift-*.f64N/A
lift-*.f64N/A
distribute-rgt-neg-inN/A
metadata-evalN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f6471.7
lift-*.f64N/A
lift-*.f64N/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lower-*.f6471.6
Applied rewrites71.6%
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6471.7
Applied rewrites71.7%
Final simplification73.4%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= t 5.9e+183) (fma b c (fma -4.0 (fma a t (* x i)) (* j (* k -27.0)))) (* t (fma -4.0 a (* 18.0 (* x (* y z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (t <= 5.9e+183) {
tmp = fma(b, c, fma(-4.0, fma(a, t, (x * i)), (j * (k * -27.0))));
} else {
tmp = t * fma(-4.0, a, (18.0 * (x * (y * z))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= 5.9e+183) tmp = fma(b, c, fma(-4.0, fma(a, t, Float64(x * i)), Float64(j * Float64(k * -27.0)))); else tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(x * Float64(y * z))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, 5.9e+183], N[(b * c + N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * a + N[(18.0 * N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.9 \cdot 10^{+183}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, \mathsf{fma}\left(a, t, x \cdot i\right), j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(x \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if t < 5.89999999999999956e183Initial program 89.1%
Taylor expanded in y around 0
sub-negN/A
lower-fma.f64N/A
associate-+r+N/A
distribute-neg-inN/A
distribute-lft-outN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6484.1
Applied rewrites84.1%
if 5.89999999999999956e183 < t Initial program 84.9%
Taylor expanded in t around inf
lower-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-*.f64N/A
lower-*.f6488.4
Applied rewrites88.4%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma b c (* a (* t -4.0)))))
(if (<= (* b c) -1e+195)
t_1
(if (<= (* b c) 6e+162) (* -4.0 (fma a t (* x i))) 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 = fma(b, c, (a * (t * -4.0)));
double tmp;
if ((b * c) <= -1e+195) {
tmp = t_1;
} else if ((b * c) <= 6e+162) {
tmp = -4.0 * fma(a, t, (x * i));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(b, c, Float64(a * Float64(t * -4.0))) tmp = 0.0 if (Float64(b * c) <= -1e+195) tmp = t_1; elseif (Float64(b * c) <= 6e+162) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(b * c + N[(a * N[(t * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+195], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 6e+162], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, c, a \cdot \left(t \cdot -4\right)\right)\\
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 6 \cdot 10^{+162}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -9.99999999999999977e194 or 5.9999999999999996e162 < (*.f64 b c) Initial program 79.5%
Taylor expanded in x around 0
sub-negN/A
lower-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
lower-fma.f64N/A
lower-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6490.8
Applied rewrites90.8%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6481.5
Applied rewrites81.5%
if -9.99999999999999977e194 < (*.f64 b c) < 5.9999999999999996e162Initial program 91.7%
Applied rewrites96.3%
Taylor expanded in a around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
lower-*.f6472.4
Applied rewrites72.4%
Taylor expanded in k around 0
distribute-lft-outN/A
lower-*.f64N/A
lower-fma.f64N/A
lower-*.f6449.0
Applied rewrites49.0%
Final simplification57.0%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -3.2e-20) (* b c) (if (<= (* b c) 1.6e+143) (* -4.0 (* t a)) (* b c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.2e-20) {
tmp = b * c;
} else if ((b * c) <= 1.6e+143) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-3.2d-20)) then
tmp = b * c
else if ((b * c) <= 1.6d+143) then
tmp = (-4.0d0) * (t * a)
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -3.2e-20) {
tmp = b * c;
} else if ((b * c) <= 1.6e+143) {
tmp = -4.0 * (t * a);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -3.2e-20: tmp = b * c elif (b * c) <= 1.6e+143: tmp = -4.0 * (t * a) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -3.2e-20) tmp = Float64(b * c); elseif (Float64(b * c) <= 1.6e+143) tmp = Float64(-4.0 * Float64(t * a)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b * c) <= -3.2e-20) tmp = b * c; elseif ((b * c) <= 1.6e+143) tmp = -4.0 * (t * a); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -3.2e-20], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.6e+143], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -3.2 \cdot 10^{-20}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 1.6 \cdot 10^{+143}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -3.1999999999999997e-20 or 1.60000000000000008e143 < (*.f64 b c) Initial program 81.4%
Taylor expanded in b around inf
lower-*.f6449.8
Applied rewrites49.8%
if -3.1999999999999997e-20 < (*.f64 b c) < 1.60000000000000008e143Initial program 93.9%
Taylor expanded in a around inf
lower-*.f64N/A
lower-*.f6426.3
Applied rewrites26.3%
Final simplification36.1%
(FPCore (x y z t a b c i j k) :precision binary64 (* b c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
code = b * c
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return b * c;
}
def code(x, y, z, t, a, b, c, i, j, k): return b * c
function code(x, y, z, t, a, b, c, i, j, k) return Float64(b * c) end
function tmp = code(x, y, z, t, a, b, c, i, j, k) tmp = b * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(b * c), $MachinePrecision]
\begin{array}{l}
\\
b \cdot c
\end{array}
Initial program 88.7%
Taylor expanded in b around inf
lower-*.f6423.2
Applied rewrites23.2%
(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 2024216
(FPCore (x y z t a b c i j k)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, E"
:precision binary64
:alt
(! :herbie-platform default (if (< t -8105407698770699/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))) (if (< t 8284013971902611/50000000000000) (+ (- (* (* 18 y) (* x (* z t))) (* (+ (* a t) (* i x)) 4)) (- (* c b) (* 27 (* k j)))) (- (- (* (* 18 t) (* (* x y) z)) (* (+ (* a t) (* i x)) 4)) (- (* (* k j) 27) (* c b))))))
(- (- (+ (- (* (* (* (* x 18.0) y) z) t) (* (* a 4.0) t)) (* b c)) (* (* x 4.0) i)) (* (* j 27.0) k)))