
(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 (* (* j 27.0) k)))
(if (<=
(-
(-
(+ (- (* (* (* (* x 18.0) y) z) t) (* t (* a 4.0))) (* b c))
(* (* x 4.0) i))
t_1)
INFINITY)
(-
(fma
(* z (* x (* 18.0 y)))
t
(fma t (* a -4.0) (fma b c (* -4.0 (* x i)))))
t_1)
(* x (fma -4.0 i (* t (* 18.0 (* 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 t_1 = (j * 27.0) * k;
double tmp;
if (((((((((x * 18.0) * y) * z) * t) - (t * (a * 4.0))) + (b * c)) - ((x * 4.0) * i)) - t_1) <= ((double) INFINITY)) {
tmp = fma((z * (x * (18.0 * y))), t, fma(t, (a * -4.0), fma(b, c, (-4.0 * (x * i))))) - t_1;
} else {
tmp = x * fma(-4.0, i, (t * (18.0 * (y * z))));
}
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 (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)) - t_1) <= Inf) tmp = Float64(fma(Float64(z * Float64(x * Float64(18.0 * y))), t, fma(t, Float64(a * -4.0), fma(b, c, Float64(-4.0 * Float64(x * i))))) - t_1); else tmp = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))); 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[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] - t$95$1), $MachinePrecision], Infinity], N[(N[(N[(z * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t + N[(t * N[(a * -4.0), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\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) - t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(z \cdot \left(x \cdot \left(18 \cdot y\right)\right), t, \mathsf{fma}\left(t, a \cdot -4, \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right) - t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\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.1%
associate--l+N/A
sub-negN/A
associate-+l+N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
sub-negN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
Applied egg-rr97.1%
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
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.6%
Simplified59.6%
Final simplification93.1%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma b c (* -4.0 (* x i)))))
(if (<= z 7.5e+80)
(fma (* j k) -27.0 (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) t_1))
(-
(fma (* t (* x (* 18.0 y))) z (fma t (* a -4.0) t_1))
(* (* 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 t_1 = fma(b, c, (-4.0 * (x * i)));
double tmp;
if (z <= 7.5e+80) {
tmp = fma((j * k), -27.0, fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), t_1));
} else {
tmp = fma((t * (x * (18.0 * y))), z, fma(t, (a * -4.0), t_1)) - ((j * 27.0) * k);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = fma(b, c, Float64(-4.0 * Float64(x * i))) tmp = 0.0 if (z <= 7.5e+80) tmp = fma(Float64(j * k), -27.0, fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), t_1)); else tmp = Float64(fma(Float64(t * Float64(x * Float64(18.0 * y))), z, fma(t, Float64(a * -4.0), t_1)) - Float64(Float64(j * 27.0) * k)); 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[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 7.5e+80], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * N[(x * N[(18.0 * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * z + N[(t * N[(a * -4.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{if}\;z \leq 7.5 \cdot 10^{+80}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), t\_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t \cdot \left(x \cdot \left(18 \cdot y\right)\right), z, \mathsf{fma}\left(t, a \cdot -4, t\_1\right)\right) - \left(j \cdot 27\right) \cdot k\\
\end{array}
\end{array}
if z < 7.49999999999999994e80Initial program 87.1%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr92.2%
if 7.49999999999999994e80 < z Initial program 85.5%
associate--l+N/A
sub-negN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-evalN/A
Applied egg-rr90.4%
Final simplification91.9%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* -4.0 (* t a))))
(if (<= (* b c) -1e+123)
(fma b c (* -4.0 (* x i)))
(if (<= (* b c) -1.0)
(fma (* j k) -27.0 t_1)
(if (<= (* b c) -5e-102)
(* t (* (* x y) (* 18.0 z)))
(if (<= (* b c) 2e+71) (* -4.0 (fma a t (* x i))) (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 = -4.0 * (t * a);
double tmp;
if ((b * c) <= -1e+123) {
tmp = fma(b, c, (-4.0 * (x * i)));
} else if ((b * c) <= -1.0) {
tmp = fma((j * k), -27.0, t_1);
} else if ((b * c) <= -5e-102) {
tmp = t * ((x * y) * (18.0 * z));
} else if ((b * c) <= 2e+71) {
tmp = -4.0 * fma(a, t, (x * i));
} else {
tmp = fma(b, c, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(-4.0 * Float64(t * a)) tmp = 0.0 if (Float64(b * c) <= -1e+123) tmp = fma(b, c, Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= -1.0) tmp = fma(Float64(j * k), -27.0, t_1); elseif (Float64(b * c) <= -5e-102) tmp = Float64(t * Float64(Float64(x * y) * Float64(18.0 * z))); elseif (Float64(b * c) <= 2e+71) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); else tmp = 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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -1e+123], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -1.0], N[(N[(j * k), $MachinePrecision] * -27.0 + t$95$1), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-102], N[(t * N[(N[(x * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+71], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -4 \cdot \left(t \cdot a\right)\\
\mathbf{if}\;b \cdot c \leq -1 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{elif}\;b \cdot c \leq -1:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, t\_1\right)\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-102}:\\
\;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+71}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, c, t\_1\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -9.99999999999999978e122Initial program 75.9%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6478.5%
Simplified78.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6471.1%
Simplified71.1%
if -9.99999999999999978e122 < (*.f64 b c) < -1Initial program 94.0%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr94.0%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6477.0%
Simplified77.0%
if -1 < (*.f64 b c) < -5.00000000000000026e-102Initial program 86.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr86.7%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6454.5%
Simplified54.5%
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.0%
Applied egg-rr61.0%
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.4%
Applied egg-rr65.4%
if -5.00000000000000026e-102 < (*.f64 b c) < 2.0000000000000001e71Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6475.6%
Simplified75.6%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6455.1%
Simplified55.1%
Taylor expanded in b around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6454.3%
Simplified54.3%
if 2.0000000000000001e71 < (*.f64 b c) Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6490.7%
Simplified90.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.0%
Simplified76.0%
Final simplification62.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (* j 27.0) k)))
(if (<= t_1 -5e+165)
(- (* b c) t_1)
(if (<= t_1 2e+154)
(fma b c (* -4.0 (fma i x (* t a))))
(fma (* j k) -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 = (j * 27.0) * k;
double tmp;
if (t_1 <= -5e+165) {
tmp = (b * c) - t_1;
} else if (t_1 <= 2e+154) {
tmp = fma(b, c, (-4.0 * fma(i, x, (t * a))));
} else {
tmp = fma((j * k), -27.0, (-4.0 * (x * i)));
}
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 <= -5e+165) tmp = Float64(Float64(b * c) - t_1); elseif (t_1 <= 2e+154) tmp = fma(b, c, Float64(-4.0 * fma(i, x, Float64(t * a)))); else tmp = fma(Float64(j * k), -27.0, Float64(-4.0 * Float64(x * i))); 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, -5e+165], N[(N[(b * c), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[t$95$1, 2e+154], N[(b * c + N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot 27\right) \cdot k\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+165}:\\
\;\;\;\;b \cdot c - t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+154}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, -4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 j #s(literal 27 binary64)) k) < -4.9999999999999997e165Initial program 77.7%
Taylor expanded in b around inf
*-lowering-*.f6470.0%
Simplified70.0%
if -4.9999999999999997e165 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) < 2.00000000000000007e154Initial program 89.9%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.8%
Simplified76.8%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6470.3%
Simplified70.3%
if 2.00000000000000007e154 < (*.f64 (*.f64 j #s(literal 27 binary64)) k) Initial program 80.0%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr79.9%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-lowering-*.f6474.7%
Simplified74.7%
Final simplification70.8%
(FPCore (x y z t a b c i j k) :precision binary64 (fma (* j k) -27.0 (fma t (fma x (* 18.0 (* y z)) (* a -4.0)) (fma b c (* -4.0 (* x i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
return fma((j * k), -27.0, fma(t, fma(x, (18.0 * (y * z)), (a * -4.0)), fma(b, c, (-4.0 * (x * i)))));
}
function code(x, y, z, t, a, b, c, i, j, k) return fma(Float64(j * k), -27.0, fma(t, fma(x, Float64(18.0 * Float64(y * z)), Float64(a * -4.0)), fma(b, c, Float64(-4.0 * Float64(x * i))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := N[(N[(j * k), $MachinePrecision] * -27.0 + N[(t * N[(x * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(a * -4.0), $MachinePrecision]), $MachinePrecision] + N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(j \cdot k, -27, \mathsf{fma}\left(t, \mathsf{fma}\left(x, 18 \cdot \left(y \cdot z\right), a \cdot -4\right), \mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\right)\right)
\end{array}
Initial program 86.8%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr90.0%
Final simplification90.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma b c (* -4.0 (* t a)))))
(if (<= (* b c) -2e+215)
t_1
(if (<= (* b c) 1e-130)
(fma (* j k) -27.0 (* -4.0 (* x i)))
(if (<= (* b c) 2e+71) (* -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, (-4.0 * (t * a)));
double tmp;
if ((b * c) <= -2e+215) {
tmp = t_1;
} else if ((b * c) <= 1e-130) {
tmp = fma((j * k), -27.0, (-4.0 * (x * i)));
} else if ((b * c) <= 2e+71) {
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(-4.0 * Float64(t * a))) tmp = 0.0 if (Float64(b * c) <= -2e+215) tmp = t_1; elseif (Float64(b * c) <= 1e-130) tmp = fma(Float64(j * k), -27.0, Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 2e+71) 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[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+215], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 1e-130], N[(N[(j * k), $MachinePrecision] * -27.0 + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+71], 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, -4 \cdot \left(t \cdot a\right)\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+215}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 10^{-130}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot k, -27, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+71}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999981e215 or 2.0000000000000001e71 < (*.f64 b c) Initial program 82.8%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6486.7%
Simplified86.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6475.8%
Simplified75.8%
if -1.99999999999999981e215 < (*.f64 b c) < 1.0000000000000001e-130Initial program 89.9%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr91.3%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-lowering-*.f6453.5%
Simplified53.5%
if 1.0000000000000001e-130 < (*.f64 b c) < 2.0000000000000001e71Initial program 84.1%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6477.0%
Simplified77.0%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6459.3%
Simplified59.3%
Taylor expanded in b around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6456.6%
Simplified56.6%
Final simplification60.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -1.0)
(- (* b c) (* (* j 27.0) k))
(if (<= (* b c) -5e-102)
(* t (* (* x y) (* 18.0 z)))
(if (<= (* b c) 2e+71)
(* -4.0 (fma a t (* x i)))
(fma b c (* -4.0 (* t a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.0) {
tmp = (b * c) - ((j * 27.0) * k);
} else if ((b * c) <= -5e-102) {
tmp = t * ((x * y) * (18.0 * z));
} else if ((b * c) <= 2e+71) {
tmp = -4.0 * fma(a, t, (x * i));
} else {
tmp = fma(b, c, (-4.0 * (t * a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.0) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); elseif (Float64(b * c) <= -5e-102) tmp = Float64(t * Float64(Float64(x * y) * Float64(18.0 * z))); elseif (Float64(b * c) <= 2e+71) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); else tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.0], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -5e-102], N[(t * N[(N[(x * y), $MachinePrecision] * N[(18.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+71], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{elif}\;b \cdot c \leq -5 \cdot 10^{-102}:\\
\;\;\;\;t \cdot \left(\left(x \cdot y\right) \cdot \left(18 \cdot z\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+71}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1Initial program 81.6%
Taylor expanded in b around inf
*-lowering-*.f6460.9%
Simplified60.9%
if -1 < (*.f64 b c) < -5.00000000000000026e-102Initial program 86.2%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr86.7%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6454.5%
Simplified54.5%
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
associate-*l*N/A
*-commutativeN/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.0%
Applied egg-rr61.0%
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6465.4%
Applied egg-rr65.4%
if -5.00000000000000026e-102 < (*.f64 b c) < 2.0000000000000001e71Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6475.6%
Simplified75.6%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6455.1%
Simplified55.1%
Taylor expanded in b around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6454.3%
Simplified54.3%
if 2.0000000000000001e71 < (*.f64 b c) Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6490.7%
Simplified90.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.0%
Simplified76.0%
Final simplification60.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* x (fma -4.0 i (* t (* 18.0 (* y z)))))))
(if (<= x -1.65e+116)
t_1
(if (<= x -1.5e+23)
(fma b c (* -4.0 (fma i x (* t a))))
(if (<= x 4.4e+58)
(fma b c (fma -4.0 (* t a) (* j (* k -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 = x * fma(-4.0, i, (t * (18.0 * (y * z))));
double tmp;
if (x <= -1.65e+116) {
tmp = t_1;
} else if (x <= -1.5e+23) {
tmp = fma(b, c, (-4.0 * fma(i, x, (t * a))));
} else if (x <= 4.4e+58) {
tmp = fma(b, c, fma(-4.0, (t * a), (j * (k * -27.0))));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))) tmp = 0.0 if (x <= -1.65e+116) tmp = t_1; elseif (x <= -1.5e+23) tmp = fma(b, c, Float64(-4.0 * fma(i, x, Float64(t * a)))); elseif (x <= 4.4e+58) tmp = fma(b, c, fma(-4.0, Float64(t * a), Float64(j * Float64(k * -27.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[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+116], t$95$1, If[LessEqual[x, -1.5e+23], N[(b * c + N[(-4.0 * N[(i * x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e+58], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+116}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{+23}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \mathsf{fma}\left(i, x, t \cdot a\right)\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+58}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, t \cdot a, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.6499999999999999e116 or 4.4000000000000001e58 < x Initial program 74.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6477.0%
Simplified77.0%
if -1.6499999999999999e116 < x < -1.5e23Initial program 84.1%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6483.8%
Simplified83.8%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6474.4%
Simplified74.4%
if -1.5e23 < x < 4.4000000000000001e58Initial program 95.0%
Taylor expanded in x around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6479.1%
Simplified79.1%
Final simplification77.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -1.35e+125)
(* b c)
(if (<= (* b c) -6.5e-109)
(* (* j k) -27.0)
(if (<= (* b c) 3.6e+134) (* -4.0 (* x i)) (* b c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.35e+125) {
tmp = b * c;
} else if ((b * c) <= -6.5e-109) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 3.6e+134) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-1.35d+125)) then
tmp = b * c
else if ((b * c) <= (-6.5d-109)) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 3.6d+134) then
tmp = (-4.0d0) * (x * i)
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.35e+125) {
tmp = b * c;
} else if ((b * c) <= -6.5e-109) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 3.6e+134) {
tmp = -4.0 * (x * i);
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -1.35e+125: tmp = b * c elif (b * c) <= -6.5e-109: tmp = (j * k) * -27.0 elif (b * c) <= 3.6e+134: tmp = -4.0 * (x * i) else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.35e+125) tmp = Float64(b * c); elseif (Float64(b * c) <= -6.5e-109) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 3.6e+134) tmp = Float64(-4.0 * Float64(x * i)); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b * c) <= -1.35e+125) tmp = b * c; elseif ((b * c) <= -6.5e-109) tmp = (j * k) * -27.0; elseif ((b * c) <= 3.6e+134) tmp = -4.0 * (x * i); else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.35e+125], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], -6.5e-109], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 3.6e+134], N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.35 \cdot 10^{+125}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq -6.5 \cdot 10^{-109}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 3.6 \cdot 10^{+134}:\\
\;\;\;\;-4 \cdot \left(x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.3499999999999999e125 or 3.59999999999999988e134 < (*.f64 b c) Initial program 80.9%
Taylor expanded in b around inf
*-lowering-*.f6466.8%
Simplified66.8%
if -1.3499999999999999e125 < (*.f64 b c) < -6.49999999999999959e-109Initial program 88.6%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr91.7%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6440.7%
Simplified40.7%
if -6.49999999999999959e-109 < (*.f64 b c) < 3.59999999999999988e134Initial program 89.3%
Taylor expanded in i around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6431.1%
Simplified31.1%
Final simplification42.6%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2.2e+126)
(* b c)
(if (<= (* b c) 9e-131)
(* (* j k) -27.0)
(if (<= (* b c) 4.4e+48) (* -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) <= -2.2e+126) {
tmp = b * c;
} else if ((b * c) <= 9e-131) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 4.4e+48) {
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) <= (-2.2d+126)) then
tmp = b * c
else if ((b * c) <= 9d-131) then
tmp = (j * k) * (-27.0d0)
else if ((b * c) <= 4.4d+48) 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) <= -2.2e+126) {
tmp = b * c;
} else if ((b * c) <= 9e-131) {
tmp = (j * k) * -27.0;
} else if ((b * c) <= 4.4e+48) {
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) <= -2.2e+126: tmp = b * c elif (b * c) <= 9e-131: tmp = (j * k) * -27.0 elif (b * c) <= 4.4e+48: 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) <= -2.2e+126) tmp = Float64(b * c); elseif (Float64(b * c) <= 9e-131) tmp = Float64(Float64(j * k) * -27.0); elseif (Float64(b * c) <= 4.4e+48) 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) <= -2.2e+126) tmp = b * c; elseif ((b * c) <= 9e-131) tmp = (j * k) * -27.0; elseif ((b * c) <= 4.4e+48) 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], -2.2e+126], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 9e-131], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 4.4e+48], N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2.2 \cdot 10^{+126}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 9 \cdot 10^{-131}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{elif}\;b \cdot c \leq 4.4 \cdot 10^{+48}:\\
\;\;\;\;-4 \cdot \left(t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -2.19999999999999999e126 or 4.3999999999999999e48 < (*.f64 b c) Initial program 82.6%
Taylor expanded in b around inf
*-lowering-*.f6460.5%
Simplified60.5%
if -2.19999999999999999e126 < (*.f64 b c) < 9.0000000000000004e-131Initial program 90.3%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr91.8%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6429.6%
Simplified29.6%
if 9.0000000000000004e-131 < (*.f64 b c) < 4.3999999999999999e48Initial program 83.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6437.1%
Simplified37.1%
Final simplification41.0%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= t -8.6e+69)
(* t (fma -4.0 a (* 18.0 (* z (* x y)))))
(if (<= t 3e+37)
(fma b c (fma -4.0 (* x i) (* j (* k -27.0))))
(* t (fma (* (* x 18.0) z) y (* 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 <= -8.6e+69) {
tmp = t * fma(-4.0, a, (18.0 * (z * (x * y))));
} else if (t <= 3e+37) {
tmp = fma(b, c, fma(-4.0, (x * i), (j * (k * -27.0))));
} else {
tmp = t * fma(((x * 18.0) * z), y, (a * -4.0));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (t <= -8.6e+69) tmp = Float64(t * fma(-4.0, a, Float64(18.0 * Float64(z * Float64(x * y))))); elseif (t <= 3e+37) tmp = fma(b, c, fma(-4.0, Float64(x * i), Float64(j * Float64(k * -27.0)))); else tmp = Float64(t * fma(Float64(Float64(x * 18.0) * z), y, Float64(a * -4.0))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[t, -8.6e+69], N[(t * N[(-4.0 * a + N[(18.0 * N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+37], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(x * 18.0), $MachinePrecision] * z), $MachinePrecision] * y + N[(a * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+69}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(-4, a, 18 \cdot \left(z \cdot \left(x \cdot y\right)\right)\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(b, c, \mathsf{fma}\left(-4, x \cdot i, j \cdot \left(k \cdot -27\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(\left(x \cdot 18\right) \cdot z, y, a \cdot -4\right)\\
\end{array}
\end{array}
if t < -8.59999999999999986e69Initial program 90.7%
Taylor expanded in t around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6476.2%
Simplified76.2%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6478.0%
Applied egg-rr78.0%
if -8.59999999999999986e69 < t < 3.00000000000000022e37Initial program 89.8%
Taylor expanded in t around 0
sub-negN/A
accelerator-lowering-fma.f64N/A
distribute-neg-inN/A
distribute-lft-neg-inN/A
metadata-evalN/A
distribute-lft-neg-inN/A
metadata-evalN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6480.5%
Simplified80.5%
if 3.00000000000000022e37 < t Initial program 75.8%
Taylor expanded in t around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.1%
Simplified68.1%
+-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6471.6%
Applied egg-rr71.6%
Final simplification77.9%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= x -2.9e+125) (* x (fma -4.0 i (* t (* 18.0 (* y z))))) (fma b c (fma -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 tmp;
if (x <= -2.9e+125) {
tmp = x * fma(-4.0, i, (t * (18.0 * (y * z))));
} else {
tmp = fma(b, c, fma(-4.0, fma(a, t, (x * i)), (j * (k * -27.0))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -2.9e+125) tmp = Float64(x * fma(-4.0, i, Float64(t * Float64(18.0 * Float64(y * z))))); else tmp = fma(b, c, fma(-4.0, fma(a, t, Float64(x * i)), Float64(j * Float64(k * -27.0)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -2.9e+125], N[(x * N[(-4.0 * i + N[(t * N[(18.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c + N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision] + N[(j * N[(k * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+125}:\\
\;\;\;\;x \cdot \mathsf{fma}\left(-4, i, t \cdot \left(18 \cdot \left(y \cdot z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\end{array}
\end{array}
if x < -2.89999999999999993e125Initial program 79.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
cancel-sign-sub-invN/A
metadata-evalN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6484.9%
Simplified84.9%
if -2.89999999999999993e125 < x Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6482.4%
Simplified82.4%
Final simplification82.8%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= (* b c) -2e+224)
(fma b c (* -4.0 (* x i)))
(if (<= (* b c) 2e+71)
(* -4.0 (fma a t (* x i)))
(fma b c (* -4.0 (* t a))))))
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) <= -2e+224) {
tmp = fma(b, c, (-4.0 * (x * i)));
} else if ((b * c) <= 2e+71) {
tmp = -4.0 * fma(a, t, (x * i));
} else {
tmp = fma(b, c, (-4.0 * (t * a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -2e+224) tmp = fma(b, c, Float64(-4.0 * Float64(x * i))); elseif (Float64(b * c) <= 2e+71) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); else tmp = fma(b, c, Float64(-4.0 * Float64(t * a))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -2e+224], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2e+71], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c + N[(-4.0 * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+224}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{elif}\;b \cdot c \leq 2 \cdot 10^{+71}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(t \cdot a\right)\right)\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999994e224Initial program 80.0%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6483.3%
Simplified83.3%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6477.5%
Simplified77.5%
if -1.99999999999999994e224 < (*.f64 b c) < 2.0000000000000001e71Initial program 87.6%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6473.4%
Simplified73.4%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6451.3%
Simplified51.3%
Taylor expanded in b around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6450.1%
Simplified50.1%
if 2.0000000000000001e71 < (*.f64 b c) Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6490.7%
Simplified90.7%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6476.0%
Simplified76.0%
Final simplification57.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (fma b c (* -4.0 (* x i)))))
(if (<= (* b c) -2e+224)
t_1
(if (<= (* b c) 5e+36) (* -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, (-4.0 * (x * i)));
double tmp;
if ((b * c) <= -2e+224) {
tmp = t_1;
} else if ((b * c) <= 5e+36) {
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(-4.0 * Float64(x * i))) tmp = 0.0 if (Float64(b * c) <= -2e+224) tmp = t_1; elseif (Float64(b * c) <= 5e+36) 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[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b * c), $MachinePrecision], -2e+224], t$95$1, If[LessEqual[N[(b * c), $MachinePrecision], 5e+36], 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, -4 \cdot \left(x \cdot i\right)\right)\\
\mathbf{if}\;b \cdot c \leq -2 \cdot 10^{+224}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \cdot c \leq 5 \cdot 10^{+36}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 b c) < -1.99999999999999994e224 or 4.99999999999999977e36 < (*.f64 b c) Initial program 85.0%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6487.6%
Simplified87.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6474.9%
Simplified74.9%
if -1.99999999999999994e224 < (*.f64 b c) < 4.99999999999999977e36Initial program 87.7%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6472.8%
Simplified72.8%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6451.0%
Simplified51.0%
Taylor expanded in b around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6449.8%
Simplified49.8%
Final simplification57.6%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -1.22e+216) (* b c) (if (<= (* b c) 2.7e+135) (* -4.0 (fma a t (* x i))) (* b c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -1.22e+216) {
tmp = b * c;
} else if ((b * c) <= 2.7e+135) {
tmp = -4.0 * fma(a, t, (x * i));
} else {
tmp = b * c;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -1.22e+216) tmp = Float64(b * c); elseif (Float64(b * c) <= 2.7e+135) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); else tmp = Float64(b * c); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -1.22e+216], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 2.7e+135], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -1.22 \cdot 10^{+216}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 2.7 \cdot 10^{+135}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -1.22e216 or 2.69999999999999985e135 < (*.f64 b c) Initial program 82.5%
Taylor expanded in b around inf
*-lowering-*.f6471.5%
Simplified71.5%
if -1.22e216 < (*.f64 b c) < 2.69999999999999985e135Initial program 88.4%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6474.6%
Simplified74.6%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6453.1%
Simplified53.1%
Taylor expanded in b around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6450.9%
Simplified50.9%
Final simplification56.4%
(FPCore (x y z t a b c i j k) :precision binary64 (if (<= (* b c) -5e+125) (* b c) (if (<= (* b c) 1.45e+70) (* (* j k) -27.0) (* b c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+125) {
tmp = b * c;
} else if ((b * c) <= 1.45e+70) {
tmp = (j * k) * -27.0;
} else {
tmp = b * c;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: tmp
if ((b * c) <= (-5d+125)) then
tmp = b * c
else if ((b * c) <= 1.45d+70) then
tmp = (j * k) * (-27.0d0)
else
tmp = b * c
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if ((b * c) <= -5e+125) {
tmp = b * c;
} else if ((b * c) <= 1.45e+70) {
tmp = (j * k) * -27.0;
} else {
tmp = b * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): tmp = 0 if (b * c) <= -5e+125: tmp = b * c elif (b * c) <= 1.45e+70: tmp = (j * k) * -27.0 else: tmp = b * c return tmp
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (Float64(b * c) <= -5e+125) tmp = Float64(b * c); elseif (Float64(b * c) <= 1.45e+70) tmp = Float64(Float64(j * k) * -27.0); else tmp = Float64(b * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0; if ((b * c) <= -5e+125) tmp = b * c; elseif ((b * c) <= 1.45e+70) tmp = (j * k) * -27.0; else tmp = b * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[N[(b * c), $MachinePrecision], -5e+125], N[(b * c), $MachinePrecision], If[LessEqual[N[(b * c), $MachinePrecision], 1.45e+70], N[(N[(j * k), $MachinePrecision] * -27.0), $MachinePrecision], N[(b * c), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \cdot c \leq -5 \cdot 10^{+125}:\\
\;\;\;\;b \cdot c\\
\mathbf{elif}\;b \cdot c \leq 1.45 \cdot 10^{+70}:\\
\;\;\;\;\left(j \cdot k\right) \cdot -27\\
\mathbf{else}:\\
\;\;\;\;b \cdot c\\
\end{array}
\end{array}
if (*.f64 b c) < -4.99999999999999962e125 or 1.4499999999999999e70 < (*.f64 b c) Initial program 82.6%
Taylor expanded in b around inf
*-lowering-*.f6463.6%
Simplified63.6%
if -4.99999999999999962e125 < (*.f64 b c) < 1.4499999999999999e70Initial program 88.8%
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-neg-inN/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f64N/A
metadata-evalN/A
associate--l+N/A
distribute-rgt-out--N/A
accelerator-lowering-fma.f64N/A
Applied egg-rr90.4%
Taylor expanded in k around inf
*-lowering-*.f64N/A
*-lowering-*.f6428.1%
Simplified28.1%
Final simplification39.2%
(FPCore (x y z t a b c i j k)
:precision binary64
(if (<= x -1.8e+28)
(* -4.0 (fma a t (* x i)))
(if (<= x 1.05e+35)
(- (* b c) (* (* j 27.0) k))
(fma b c (* -4.0 (* x i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double tmp;
if (x <= -1.8e+28) {
tmp = -4.0 * fma(a, t, (x * i));
} else if (x <= 1.05e+35) {
tmp = (b * c) - ((j * 27.0) * k);
} else {
tmp = fma(b, c, (-4.0 * (x * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j, k) tmp = 0.0 if (x <= -1.8e+28) tmp = Float64(-4.0 * fma(a, t, Float64(x * i))); elseif (x <= 1.05e+35) tmp = Float64(Float64(b * c) - Float64(Float64(j * 27.0) * k)); else tmp = fma(b, c, Float64(-4.0 * Float64(x * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := If[LessEqual[x, -1.8e+28], N[(-4.0 * N[(a * t + N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.05e+35], N[(N[(b * c), $MachinePrecision] - N[(N[(j * 27.0), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(b * c + N[(-4.0 * N[(x * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+28}:\\
\;\;\;\;-4 \cdot \mathsf{fma}\left(a, t, x \cdot i\right)\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+35}:\\
\;\;\;\;b \cdot c - \left(j \cdot 27\right) \cdot k\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(b, c, -4 \cdot \left(x \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -1.8e28Initial program 81.5%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6466.1%
Simplified66.1%
Taylor expanded in j around 0
*-lowering-*.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f6460.9%
Simplified60.9%
Taylor expanded in b around 0
*-lowering-*.f64N/A
accelerator-lowering-fma.f64N/A
*-lowering-*.f6457.1%
Simplified57.1%
if -1.8e28 < x < 1.0499999999999999e35Initial program 94.7%
Taylor expanded in b around inf
*-lowering-*.f6457.5%
Simplified57.5%
if 1.0499999999999999e35 < x Initial program 72.6%
Taylor expanded in y around 0
sub-negN/A
accelerator-lowering-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
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6474.6%
Simplified74.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
*-lowering-*.f6462.9%
Simplified62.9%
Final simplification58.4%
(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 86.8%
Taylor expanded in b around inf
*-lowering-*.f6422.7%
Simplified22.7%
(FPCore (x y z t a b c i j k)
:precision binary64
(let* ((t_1 (* (+ (* a t) (* i x)) 4.0))
(t_2
(-
(- (* (* 18.0 t) (* (* x y) z)) t_1)
(- (* (* k j) 27.0) (* c b)))))
(if (< t -1.6210815397541398e-69)
t_2
(if (< t 165.68027943805222)
(+ (- (* (* 18.0 y) (* x (* z t))) t_1) (- (* c b) (* 27.0 (* k j))))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j, k)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((a * t) + (i * x)) * 4.0d0
t_2 = (((18.0d0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0d0) - (c * b))
if (t < (-1.6210815397541398d-69)) then
tmp = t_2
else if (t < 165.68027943805222d0) then
tmp = (((18.0d0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0d0 * (k * j)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j, double k) {
double t_1 = ((a * t) + (i * x)) * 4.0;
double t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b));
double tmp;
if (t < -1.6210815397541398e-69) {
tmp = t_2;
} else if (t < 165.68027943805222) {
tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j, k): t_1 = ((a * t) + (i * x)) * 4.0 t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)) tmp = 0 if t < -1.6210815397541398e-69: tmp = t_2 elif t < 165.68027943805222: tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j, k) t_1 = Float64(Float64(Float64(a * t) + Float64(i * x)) * 4.0) t_2 = Float64(Float64(Float64(Float64(18.0 * t) * Float64(Float64(x * y) * z)) - t_1) - Float64(Float64(Float64(k * j) * 27.0) - Float64(c * b))) tmp = 0.0 if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = Float64(Float64(Float64(Float64(18.0 * y) * Float64(x * Float64(z * t))) - t_1) + Float64(Float64(c * b) - Float64(27.0 * Float64(k * j)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j, k) t_1 = ((a * t) + (i * x)) * 4.0; t_2 = (((18.0 * t) * ((x * y) * z)) - t_1) - (((k * j) * 27.0) - (c * b)); tmp = 0.0; if (t < -1.6210815397541398e-69) tmp = t_2; elseif (t < 165.68027943805222) tmp = (((18.0 * y) * (x * (z * t))) - t_1) + ((c * b) - (27.0 * (k * j))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_, k_] := Block[{t$95$1 = N[(N[(N[(a * t), $MachinePrecision] + N[(i * x), $MachinePrecision]), $MachinePrecision] * 4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(18.0 * t), $MachinePrecision] * N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] - N[(N[(N[(k * j), $MachinePrecision] * 27.0), $MachinePrecision] - N[(c * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.6210815397541398e-69], t$95$2, If[Less[t, 165.68027943805222], N[(N[(N[(N[(18.0 * y), $MachinePrecision] * N[(x * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(N[(c * b), $MachinePrecision] - N[(27.0 * N[(k * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t + i \cdot x\right) \cdot 4\\
t_2 := \left(\left(18 \cdot t\right) \cdot \left(\left(x \cdot y\right) \cdot z\right) - t\_1\right) - \left(\left(k \cdot j\right) \cdot 27 - c \cdot b\right)\\
\mathbf{if}\;t < -1.6210815397541398 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 165.68027943805222:\\
\;\;\;\;\left(\left(18 \cdot y\right) \cdot \left(x \cdot \left(z \cdot t\right)\right) - t\_1\right) + \left(c \cdot b - 27 \cdot \left(k \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024193
(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)))