
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -4.5e+168)
(fma (fma (- a) t (* z y)) x (* (- b) (fma c z (* (- i) t))))
(if (<= b 3.7e+144)
(fma
(fma (- i) y (* c a))
j
(fma (fma (- x) a (* i b)) t (* (fma (- c) b (* y x)) z)))
(fma (fma (- z) c (* i t)) b (* (fma (- i) j (* z x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -4.5e+168) {
tmp = fma(fma(-a, t, (z * y)), x, (-b * fma(c, z, (-i * t))));
} else if (b <= 3.7e+144) {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-x, a, (i * b)), t, (fma(-c, b, (y * x)) * z)));
} else {
tmp = fma(fma(-z, c, (i * t)), b, (fma(-i, j, (z * x)) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -4.5e+168) tmp = fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(-b) * fma(c, z, Float64(Float64(-i) * t)))); elseif (b <= 3.7e+144) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(fma(Float64(-c), b, Float64(y * x)) * z))); else tmp = fma(fma(Float64(-z), c, Float64(i * t)), b, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -4.5e+168], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[((-b) * N[(c * z + N[((-i) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.7e+144], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{+168}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(c, z, \left(-i\right) \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 3.7 \cdot 10^{+144}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, c, i \cdot t\right), b, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if b < -4.50000000000000012e168Initial program 65.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites73.1%
Taylor expanded in j around 0
sub-negN/A
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6490.3
Applied rewrites90.3%
if -4.50000000000000012e168 < b < 3.6999999999999997e144Initial program 73.7%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites83.7%
if 3.6999999999999997e144 < b Initial program 64.3%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
Applied rewrites82.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY)
t_1
(fma (fma (- x) t (* j c)) a (* (fma (- i) j (* z x)) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(fma(-x, t, (j * c)), a, (fma(-i, j, (z * x)) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(fma(Float64(-x), t, Float64(j * c)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites28.1%
Taylor expanded in b around 0
Applied rewrites56.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<=
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))
(- INFINITY))
(* (* z x) y)
(* (* z y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= -((double) INFINITY)) {
tmp = (z * x) * y;
} else {
tmp = (z * y) * x;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= -Double.POSITIVE_INFINITY) {
tmp = (z * x) * y;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= -math.inf: tmp = (z * x) * y else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) <= Float64(-Inf)) tmp = Float64(Float64(z * x) * y); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= -Inf) tmp = (z * x) * y; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], (-Infinity)], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \leq -\infty:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < -inf.0Initial program 88.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.0
Applied rewrites54.0%
Taylor expanded in x around inf
Applied rewrites27.2%
Applied rewrites34.9%
if -inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 66.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.0
Applied rewrites39.0%
Taylor expanded in x around inf
Applied rewrites24.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- x) t (* j c)))
(t_2 (* (fma (- i) j (* z x)) y))
(t_3 (fma (fma (- z) c (* i t)) b t_2)))
(if (<= b -1.4e+88)
t_3
(if (<= b -1.2e-6)
(fma (fma (- b) c (* y x)) z (* t_1 a))
(if (<= b 5.1e-54) (fma t_1 a t_2) t_3)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-x, t, (j * c));
double t_2 = fma(-i, j, (z * x)) * y;
double t_3 = fma(fma(-z, c, (i * t)), b, t_2);
double tmp;
if (b <= -1.4e+88) {
tmp = t_3;
} else if (b <= -1.2e-6) {
tmp = fma(fma(-b, c, (y * x)), z, (t_1 * a));
} else if (b <= 5.1e-54) {
tmp = fma(t_1, a, t_2);
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-x), t, Float64(j * c)) t_2 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) t_3 = fma(fma(Float64(-z), c, Float64(i * t)), b, t_2) tmp = 0.0 if (b <= -1.4e+88) tmp = t_3; elseif (b <= -1.2e-6) tmp = fma(fma(Float64(-b), c, Float64(y * x)), z, Float64(t_1 * a)); elseif (b <= 5.1e-54) tmp = fma(t_1, a, t_2); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + t$95$2), $MachinePrecision]}, If[LessEqual[b, -1.4e+88], t$95$3, If[LessEqual[b, -1.2e-6], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(t$95$1 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.1e-54], N[(t$95$1 * a + t$95$2), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, t, j \cdot c\right)\\
t_2 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
t_3 := \mathsf{fma}\left(\mathsf{fma}\left(-z, c, i \cdot t\right), b, t\_2\right)\\
\mathbf{if}\;b \leq -1.4 \cdot 10^{+88}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq -1.2 \cdot 10^{-6}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, y \cdot x\right), z, t\_1 \cdot a\right)\\
\mathbf{elif}\;b \leq 5.1 \cdot 10^{-54}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, a, t\_2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if b < -1.39999999999999994e88 or 5.1000000000000001e-54 < b Initial program 70.6%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
Applied rewrites75.8%
if -1.39999999999999994e88 < b < -1.1999999999999999e-6Initial program 65.0%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites74.8%
Taylor expanded in i around 0
Applied rewrites71.0%
if -1.1999999999999999e-6 < b < 5.1000000000000001e-54Initial program 73.1%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites49.6%
Taylor expanded in b around 0
Applied rewrites80.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) j (* z x)) y)))
(if (<= b -1.22e+15)
(fma (fma (- a) t (* z y)) x (* (- b) (fma c z (* (- i) t))))
(if (<= b 5.1e-54)
(fma (fma (- x) t (* j c)) a t_1)
(fma (fma (- z) c (* i t)) b t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, j, (z * x)) * y;
double tmp;
if (b <= -1.22e+15) {
tmp = fma(fma(-a, t, (z * y)), x, (-b * fma(c, z, (-i * t))));
} else if (b <= 5.1e-54) {
tmp = fma(fma(-x, t, (j * c)), a, t_1);
} else {
tmp = fma(fma(-z, c, (i * t)), b, t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) tmp = 0.0 if (b <= -1.22e+15) tmp = fma(fma(Float64(-a), t, Float64(z * y)), x, Float64(Float64(-b) * fma(c, z, Float64(Float64(-i) * t)))); elseif (b <= 5.1e-54) tmp = fma(fma(Float64(-x), t, Float64(j * c)), a, t_1); else tmp = fma(fma(Float64(-z), c, Float64(i * t)), b, t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[b, -1.22e+15], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[((-b) * N[(c * z + N[((-i) * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.1e-54], N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + t$95$1), $MachinePrecision], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{if}\;b \leq -1.22 \cdot 10^{+15}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, t, z \cdot y\right), x, \left(-b\right) \cdot \mathsf{fma}\left(c, z, \left(-i\right) \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 5.1 \cdot 10^{-54}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, c, i \cdot t\right), b, t\_1\right)\\
\end{array}
\end{array}
if b < -1.22e15Initial program 71.7%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites75.9%
Taylor expanded in j around 0
sub-negN/A
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6481.8
Applied rewrites81.8%
if -1.22e15 < b < 5.1000000000000001e-54Initial program 72.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites49.6%
Taylor expanded in b around 0
Applied rewrites79.2%
if 5.1000000000000001e-54 < b Initial program 69.5%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
Applied rewrites72.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -7.2e-6)
(- (fma (fma (- i) b (* a x)) t (* (* z c) b)))
(if (<= b 9.5e+111)
(fma (fma (- x) t (* j c)) a (* (fma (- i) j (* z x)) y))
(* (fma (- z) c (* i t)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -7.2e-6) {
tmp = -fma(fma(-i, b, (a * x)), t, ((z * c) * b));
} else if (b <= 9.5e+111) {
tmp = fma(fma(-x, t, (j * c)), a, (fma(-i, j, (z * x)) * y));
} else {
tmp = fma(-z, c, (i * t)) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -7.2e-6) tmp = Float64(-fma(fma(Float64(-i), b, Float64(a * x)), t, Float64(Float64(z * c) * b))); elseif (b <= 9.5e+111) tmp = fma(fma(Float64(-x), t, Float64(j * c)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); else tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -7.2e-6], (-N[(N[((-i) * b + N[(a * x), $MachinePrecision]), $MachinePrecision] * t + N[(N[(z * c), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), If[LessEqual[b, 9.5e+111], N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.2 \cdot 10^{-6}:\\
\;\;\;\;-\mathsf{fma}\left(\mathsf{fma}\left(-i, b, a \cdot x\right), t, \left(z \cdot c\right) \cdot b\right)\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -7.19999999999999967e-6Initial program 70.0%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites73.9%
Taylor expanded in j around 0
sub-negN/A
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6479.4
Applied rewrites79.4%
Taylor expanded in y around 0
Applied rewrites71.8%
if -7.19999999999999967e-6 < b < 9.50000000000000019e111Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites54.4%
Taylor expanded in b around 0
Applied rewrites76.6%
if 9.50000000000000019e111 < b Initial program 69.2%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6473.0
Applied rewrites73.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -1.05e+176)
(* (fma (- x) a (* i b)) t)
(if (<= t 2.6e+70)
(fma (fma (- b) c (* y x)) z (* (fma (- x) t (* j c)) a))
(- (fma (fma (- i) b (* a x)) t (* (* z c) b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -1.05e+176) {
tmp = fma(-x, a, (i * b)) * t;
} else if (t <= 2.6e+70) {
tmp = fma(fma(-b, c, (y * x)), z, (fma(-x, t, (j * c)) * a));
} else {
tmp = -fma(fma(-i, b, (a * x)), t, ((z * c) * b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -1.05e+176) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); elseif (t <= 2.6e+70) tmp = fma(fma(Float64(-b), c, Float64(y * x)), z, Float64(fma(Float64(-x), t, Float64(j * c)) * a)); else tmp = Float64(-fma(fma(Float64(-i), b, Float64(a * x)), t, Float64(Float64(z * c) * b))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -1.05e+176], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t, 2.6e+70], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], (-N[(N[((-i) * b + N[(a * x), $MachinePrecision]), $MachinePrecision] * t + N[(N[(z * c), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision])]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+176}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, y \cdot x\right), z, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;-\mathsf{fma}\left(\mathsf{fma}\left(-i, b, a \cdot x\right), t, \left(z \cdot c\right) \cdot b\right)\\
\end{array}
\end{array}
if t < -1.05e176Initial program 62.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6478.4
Applied rewrites78.4%
if -1.05e176 < t < 2.6e70Initial program 76.5%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites78.1%
Taylor expanded in i around 0
Applied rewrites67.2%
if 2.6e70 < t Initial program 53.9%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites63.2%
Taylor expanded in j around 0
sub-negN/A
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6474.9
Applied rewrites74.9%
Taylor expanded in y around 0
Applied rewrites79.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) y (* c a)) j)) (t_2 (* (* b t) i)))
(if (<= b -2.02e+276)
t_2
(if (<= b -1.05e+116)
(* (* (- b) z) c)
(if (<= b -1.7e-216)
t_1
(if (<= b -1.25e-269)
(* (* y x) z)
(if (<= b 3.5e-200) t_1 (if (<= b 3.3e+84) (* (* z x) y) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, y, (c * a)) * j;
double t_2 = (b * t) * i;
double tmp;
if (b <= -2.02e+276) {
tmp = t_2;
} else if (b <= -1.05e+116) {
tmp = (-b * z) * c;
} else if (b <= -1.7e-216) {
tmp = t_1;
} else if (b <= -1.25e-269) {
tmp = (y * x) * z;
} else if (b <= 3.5e-200) {
tmp = t_1;
} else if (b <= 3.3e+84) {
tmp = (z * x) * y;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), y, Float64(c * a)) * j) t_2 = Float64(Float64(b * t) * i) tmp = 0.0 if (b <= -2.02e+276) tmp = t_2; elseif (b <= -1.05e+116) tmp = Float64(Float64(Float64(-b) * z) * c); elseif (b <= -1.7e-216) tmp = t_1; elseif (b <= -1.25e-269) tmp = Float64(Float64(y * x) * z); elseif (b <= 3.5e-200) tmp = t_1; elseif (b <= 3.3e+84) tmp = Float64(Float64(z * x) * y); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[b, -2.02e+276], t$95$2, If[LessEqual[b, -1.05e+116], N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[b, -1.7e-216], t$95$1, If[LessEqual[b, -1.25e-269], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, 3.5e-200], t$95$1, If[LessEqual[b, 3.3e+84], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
t_2 := \left(b \cdot t\right) \cdot i\\
\mathbf{if}\;b \leq -2.02 \cdot 10^{+276}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -1.05 \cdot 10^{+116}:\\
\;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;b \leq -1.7 \cdot 10^{-216}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -1.25 \cdot 10^{-269}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;b \leq 3.5 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -2.01999999999999995e276 or 3.30000000000000017e84 < b Initial program 64.5%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6467.0
Applied rewrites67.0%
Taylor expanded in y around 0
Applied rewrites56.4%
if -2.01999999999999995e276 < b < -1.0500000000000001e116Initial program 73.1%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.6
Applied rewrites49.6%
Taylor expanded in z around inf
Applied rewrites49.7%
if -1.0500000000000001e116 < b < -1.6999999999999999e-216 or -1.24999999999999995e-269 < b < 3.50000000000000023e-200Initial program 72.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites85.3%
Taylor expanded in j around inf
Applied rewrites51.2%
if -1.6999999999999999e-216 < b < -1.24999999999999995e-269Initial program 65.2%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6477.1
Applied rewrites77.1%
Taylor expanded in x around inf
Applied rewrites77.0%
if 3.50000000000000023e-200 < b < 3.30000000000000017e84Initial program 76.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.0
Applied rewrites52.0%
Taylor expanded in x around inf
Applied rewrites39.4%
Applied rewrites43.7%
Final simplification52.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- z) c (* i t)) b)))
(if (<= b -2.6e+118)
t_1
(if (<= b -2.05e-35)
(* (fma (- x) a (* i b)) t)
(if (<= b -3.5e-216)
(* (fma (- i) y (* c a)) j)
(if (<= b 1.06e+102) (* (fma (- t) a (* z y)) x) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-z, c, (i * t)) * b;
double tmp;
if (b <= -2.6e+118) {
tmp = t_1;
} else if (b <= -2.05e-35) {
tmp = fma(-x, a, (i * b)) * t;
} else if (b <= -3.5e-216) {
tmp = fma(-i, y, (c * a)) * j;
} else if (b <= 1.06e+102) {
tmp = fma(-t, a, (z * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-z), c, Float64(i * t)) * b) tmp = 0.0 if (b <= -2.6e+118) tmp = t_1; elseif (b <= -2.05e-35) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); elseif (b <= -3.5e-216) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (b <= 1.06e+102) tmp = Float64(fma(Float64(-t), a, Float64(z * y)) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -2.6e+118], t$95$1, If[LessEqual[b, -2.05e-35], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, -3.5e-216], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[b, 1.06e+102], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -2.6 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.05 \cdot 10^{-35}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{elif}\;b \leq -3.5 \cdot 10^{-216}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;b \leq 1.06 \cdot 10^{+102}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.60000000000000016e118 or 1.06000000000000001e102 < b Initial program 70.3%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6475.1
Applied rewrites75.1%
if -2.60000000000000016e118 < b < -2.05000000000000013e-35Initial program 69.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.2
Applied rewrites56.2%
if -2.05000000000000013e-35 < b < -3.49999999999999982e-216Initial program 68.7%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites87.0%
Taylor expanded in j around inf
Applied rewrites59.1%
if -3.49999999999999982e-216 < b < 1.06000000000000001e102Initial program 73.6%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites86.2%
Taylor expanded in x around inf
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.4
Applied rewrites55.4%
Final simplification63.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -6.8e+106) (not (<= b 9e+111))) (* (fma (- z) c (* i t)) b) (fma (* j a) c (* (fma (- t) a (* z y)) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -6.8e+106) || !(b <= 9e+111)) {
tmp = fma(-z, c, (i * t)) * b;
} else {
tmp = fma((j * a), c, (fma(-t, a, (z * y)) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -6.8e+106) || !(b <= 9e+111)) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); else tmp = fma(Float64(j * a), c, Float64(fma(Float64(-t), a, Float64(z * y)) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -6.8e+106], N[Not[LessEqual[b, 9e+111]], $MachinePrecision]], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[(j * a), $MachinePrecision] * c + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+106} \lor \neg \left(b \leq 9 \cdot 10^{+111}\right):\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot a, c, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\end{array}
\end{array}
if b < -6.79999999999999989e106 or 9.00000000000000001e111 < b Initial program 69.8%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6475.7
Applied rewrites75.7%
if -6.79999999999999989e106 < b < 9.00000000000000001e111Initial program 72.1%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites67.6%
Taylor expanded in z around 0
Applied rewrites61.6%
Final simplification66.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -6.5e-15)
(- (fma (fma (- i) b (* a x)) t (* (* z c) b)))
(if (<= b 9e+111)
(fma (* j a) c (* (fma (- t) a (* z y)) x))
(* (fma (- z) c (* i t)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -6.5e-15) {
tmp = -fma(fma(-i, b, (a * x)), t, ((z * c) * b));
} else if (b <= 9e+111) {
tmp = fma((j * a), c, (fma(-t, a, (z * y)) * x));
} else {
tmp = fma(-z, c, (i * t)) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -6.5e-15) tmp = Float64(-fma(fma(Float64(-i), b, Float64(a * x)), t, Float64(Float64(z * c) * b))); elseif (b <= 9e+111) tmp = fma(Float64(j * a), c, Float64(fma(Float64(-t), a, Float64(z * y)) * x)); else tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -6.5e-15], (-N[(N[((-i) * b + N[(a * x), $MachinePrecision]), $MachinePrecision] * t + N[(N[(z * c), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), If[LessEqual[b, 9e+111], N[(N[(j * a), $MachinePrecision] * c + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{-15}:\\
\;\;\;\;-\mathsf{fma}\left(\mathsf{fma}\left(-i, b, a \cdot x\right), t, \left(z \cdot c\right) \cdot b\right)\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+111}:\\
\;\;\;\;\mathsf{fma}\left(j \cdot a, c, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -6.49999999999999991e-15Initial program 71.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites74.9%
Taylor expanded in j around 0
sub-negN/A
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6480.2
Applied rewrites80.2%
Taylor expanded in y around 0
Applied rewrites72.9%
if -6.49999999999999991e-15 < b < 9.00000000000000001e111Initial program 71.9%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites68.0%
Taylor expanded in z around 0
Applied rewrites62.9%
if 9.00000000000000001e111 < b Initial program 69.2%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6473.0
Applied rewrites73.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -8.8e+68)
(* (fma (- z) b (* j a)) c)
(if (<= j 6.8e+65)
(fma (fma (- a) x (* i b)) t (* (* y z) x))
(* (fma (- i) y (* c a)) j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -8.8e+68) {
tmp = fma(-z, b, (j * a)) * c;
} else if (j <= 6.8e+65) {
tmp = fma(fma(-a, x, (i * b)), t, ((y * z) * x));
} else {
tmp = fma(-i, y, (c * a)) * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -8.8e+68) tmp = Float64(fma(Float64(-z), b, Float64(j * a)) * c); elseif (j <= 6.8e+65) tmp = fma(fma(Float64(-a), x, Float64(i * b)), t, Float64(Float64(y * z) * x)); else tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -8.8e+68], N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[j, 6.8e+65], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[(y * z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -8.8 \cdot 10^{+68}:\\
\;\;\;\;\mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\\
\mathbf{elif}\;j \leq 6.8 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-a, x, i \cdot b\right), t, \left(y \cdot z\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if j < -8.79999999999999949e68Initial program 68.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.2
Applied rewrites55.2%
if -8.79999999999999949e68 < j < 6.7999999999999999e65Initial program 72.5%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites64.6%
Taylor expanded in j around 0
sub-negN/A
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-fma.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
sub-negN/A
mul-1-negN/A
lower-fma.f64N/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6471.9
Applied rewrites71.9%
Taylor expanded in c around 0
Applied rewrites63.0%
if 6.7999999999999999e65 < j Initial program 68.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites66.6%
Taylor expanded in j around inf
Applied rewrites76.4%
Final simplification63.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* b t) i)))
(if (<= b -1.85e+276)
t_1
(if (<= b -3.3e+106)
(* (* (- b) c) z)
(if (<= b -8e-176)
(* (* j a) c)
(if (<= b 3.3e+84) (* (* y x) z) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * t) * i;
double tmp;
if (b <= -1.85e+276) {
tmp = t_1;
} else if (b <= -3.3e+106) {
tmp = (-b * c) * z;
} else if (b <= -8e-176) {
tmp = (j * a) * c;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: t_1
real(8) :: tmp
t_1 = (b * t) * i
if (b <= (-1.85d+276)) then
tmp = t_1
else if (b <= (-3.3d+106)) then
tmp = (-b * c) * z
else if (b <= (-8d-176)) then
tmp = (j * a) * c
else if (b <= 3.3d+84) then
tmp = (y * x) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (b * t) * i;
double tmp;
if (b <= -1.85e+276) {
tmp = t_1;
} else if (b <= -3.3e+106) {
tmp = (-b * c) * z;
} else if (b <= -8e-176) {
tmp = (j * a) * c;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (b * t) * i tmp = 0 if b <= -1.85e+276: tmp = t_1 elif b <= -3.3e+106: tmp = (-b * c) * z elif b <= -8e-176: tmp = (j * a) * c elif b <= 3.3e+84: tmp = (y * x) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(b * t) * i) tmp = 0.0 if (b <= -1.85e+276) tmp = t_1; elseif (b <= -3.3e+106) tmp = Float64(Float64(Float64(-b) * c) * z); elseif (b <= -8e-176) tmp = Float64(Float64(j * a) * c); elseif (b <= 3.3e+84) tmp = Float64(Float64(y * x) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (b * t) * i; tmp = 0.0; if (b <= -1.85e+276) tmp = t_1; elseif (b <= -3.3e+106) tmp = (-b * c) * z; elseif (b <= -8e-176) tmp = (j * a) * c; elseif (b <= 3.3e+84) tmp = (y * x) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[b, -1.85e+276], t$95$1, If[LessEqual[b, -3.3e+106], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, -8e-176], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[b, 3.3e+84], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b \cdot t\right) \cdot i\\
\mathbf{if}\;b \leq -1.85 \cdot 10^{+276}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.3 \cdot 10^{+106}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;b \leq -8 \cdot 10^{-176}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.84999999999999989e276 or 3.30000000000000017e84 < b Initial program 64.5%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6467.0
Applied rewrites67.0%
Taylor expanded in y around 0
Applied rewrites56.4%
if -1.84999999999999989e276 < b < -3.30000000000000008e106Initial program 73.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.6
Applied rewrites55.6%
Taylor expanded in x around 0
Applied rewrites48.5%
if -3.30000000000000008e106 < b < -8e-176Initial program 65.9%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.8
Applied rewrites43.8%
Taylor expanded in z around 0
Applied rewrites33.5%
if -8e-176 < b < 3.30000000000000017e84Initial program 76.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in x around inf
Applied rewrites39.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= z -3.2e+68) (not (<= z 2.4e+31))) (* (fma (- c) b (* y x)) z) (* (fma (- x) a (* i b)) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((z <= -3.2e+68) || !(z <= 2.4e+31)) {
tmp = fma(-c, b, (y * x)) * z;
} else {
tmp = fma(-x, a, (i * b)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((z <= -3.2e+68) || !(z <= 2.4e+31)) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); else tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -3.2e+68], N[Not[LessEqual[z, 2.4e+31]], $MachinePrecision]], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+68} \lor \neg \left(z \leq 2.4 \cdot 10^{+31}\right):\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\end{array}
\end{array}
if z < -3.19999999999999994e68 or 2.39999999999999982e31 < z Initial program 62.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
if -3.19999999999999994e68 < z < 2.39999999999999982e31Initial program 78.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.4
Applied rewrites50.4%
Final simplification59.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= z -1e+29) (not (<= z 3e+31))) (* (fma (- c) b (* y x)) z) (* (fma (- i) y (* c a)) j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((z <= -1e+29) || !(z <= 3e+31)) {
tmp = fma(-c, b, (y * x)) * z;
} else {
tmp = fma(-i, y, (c * a)) * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((z <= -1e+29) || !(z <= 3e+31)) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); else tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -1e+29], N[Not[LessEqual[z, 3e+31]], $MachinePrecision]], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+29} \lor \neg \left(z \leq 3 \cdot 10^{+31}\right):\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if z < -9.99999999999999914e28 or 2.99999999999999989e31 < z Initial program 63.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.9
Applied rewrites66.9%
if -9.99999999999999914e28 < z < 2.99999999999999989e31Initial program 79.0%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites79.1%
Taylor expanded in j around inf
Applied rewrites44.9%
Final simplification55.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -3.5e+14)
(* (* i b) t)
(if (<= b -5.2e-176)
(* (* (- a) x) t)
(if (<= b 3.3e+84) (* (* y x) z) (* (* b t) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -3.5e+14) {
tmp = (i * b) * t;
} else if (b <= -5.2e-176) {
tmp = (-a * x) * t;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = (b * t) * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: tmp
if (b <= (-3.5d+14)) then
tmp = (i * b) * t
else if (b <= (-5.2d-176)) then
tmp = (-a * x) * t
else if (b <= 3.3d+84) then
tmp = (y * x) * z
else
tmp = (b * t) * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -3.5e+14) {
tmp = (i * b) * t;
} else if (b <= -5.2e-176) {
tmp = (-a * x) * t;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = (b * t) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -3.5e+14: tmp = (i * b) * t elif b <= -5.2e-176: tmp = (-a * x) * t elif b <= 3.3e+84: tmp = (y * x) * z else: tmp = (b * t) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -3.5e+14) tmp = Float64(Float64(i * b) * t); elseif (b <= -5.2e-176) tmp = Float64(Float64(Float64(-a) * x) * t); elseif (b <= 3.3e+84) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(b * t) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -3.5e+14) tmp = (i * b) * t; elseif (b <= -5.2e-176) tmp = (-a * x) * t; elseif (b <= 3.3e+84) tmp = (y * x) * z; else tmp = (b * t) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -3.5e+14], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, -5.2e-176], N[(N[((-a) * x), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, 3.3e+84], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{+14}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;b \leq -5.2 \cdot 10^{-176}:\\
\;\;\;\;\left(\left(-a\right) \cdot x\right) \cdot t\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if b < -3.5e14Initial program 71.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.5
Applied rewrites50.5%
Taylor expanded in x around 0
Applied rewrites43.3%
if -3.5e14 < b < -5.19999999999999984e-176Initial program 60.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.5
Applied rewrites42.5%
Taylor expanded in x around inf
Applied rewrites36.0%
if -5.19999999999999984e-176 < b < 3.30000000000000017e84Initial program 76.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in x around inf
Applied rewrites39.4%
if 3.30000000000000017e84 < b Initial program 66.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6464.5
Applied rewrites64.5%
Taylor expanded in y around 0
Applied rewrites51.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -20000000000000.0)
(* (* i b) t)
(if (<= b -8e-176)
(* (* j a) c)
(if (<= b 3.3e+84) (* (* y x) z) (* (* b t) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -20000000000000.0) {
tmp = (i * b) * t;
} else if (b <= -8e-176) {
tmp = (j * a) * c;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = (b * t) * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: tmp
if (b <= (-20000000000000.0d0)) then
tmp = (i * b) * t
else if (b <= (-8d-176)) then
tmp = (j * a) * c
else if (b <= 3.3d+84) then
tmp = (y * x) * z
else
tmp = (b * t) * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -20000000000000.0) {
tmp = (i * b) * t;
} else if (b <= -8e-176) {
tmp = (j * a) * c;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = (b * t) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -20000000000000.0: tmp = (i * b) * t elif b <= -8e-176: tmp = (j * a) * c elif b <= 3.3e+84: tmp = (y * x) * z else: tmp = (b * t) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -20000000000000.0) tmp = Float64(Float64(i * b) * t); elseif (b <= -8e-176) tmp = Float64(Float64(j * a) * c); elseif (b <= 3.3e+84) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(b * t) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -20000000000000.0) tmp = (i * b) * t; elseif (b <= -8e-176) tmp = (j * a) * c; elseif (b <= 3.3e+84) tmp = (y * x) * z; else tmp = (b * t) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -20000000000000.0], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, -8e-176], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[b, 3.3e+84], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -20000000000000:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;b \leq -8 \cdot 10^{-176}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if b < -2e13Initial program 72.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Taylor expanded in x around 0
Applied rewrites42.7%
if -2e13 < b < -8e-176Initial program 58.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.9
Applied rewrites45.9%
Taylor expanded in z around 0
Applied rewrites35.9%
if -8e-176 < b < 3.30000000000000017e84Initial program 76.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in x around inf
Applied rewrites39.4%
if 3.30000000000000017e84 < b Initial program 66.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6464.5
Applied rewrites64.5%
Taylor expanded in y around 0
Applied rewrites51.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -22000000000000.0)
(* (* i b) t)
(if (<= b -8e-176)
(* (* j c) a)
(if (<= b 3.3e+84) (* (* y x) z) (* (* b t) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -22000000000000.0) {
tmp = (i * b) * t;
} else if (b <= -8e-176) {
tmp = (j * c) * a;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = (b * t) * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: tmp
if (b <= (-22000000000000.0d0)) then
tmp = (i * b) * t
else if (b <= (-8d-176)) then
tmp = (j * c) * a
else if (b <= 3.3d+84) then
tmp = (y * x) * z
else
tmp = (b * t) * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -22000000000000.0) {
tmp = (i * b) * t;
} else if (b <= -8e-176) {
tmp = (j * c) * a;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = (b * t) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -22000000000000.0: tmp = (i * b) * t elif b <= -8e-176: tmp = (j * c) * a elif b <= 3.3e+84: tmp = (y * x) * z else: tmp = (b * t) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -22000000000000.0) tmp = Float64(Float64(i * b) * t); elseif (b <= -8e-176) tmp = Float64(Float64(j * c) * a); elseif (b <= 3.3e+84) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(b * t) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -22000000000000.0) tmp = (i * b) * t; elseif (b <= -8e-176) tmp = (j * c) * a; elseif (b <= 3.3e+84) tmp = (y * x) * z; else tmp = (b * t) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -22000000000000.0], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, -8e-176], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 3.3e+84], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -22000000000000:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;b \leq -8 \cdot 10^{-176}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if b < -2.2e13Initial program 72.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Taylor expanded in x around 0
Applied rewrites42.7%
if -2.2e13 < b < -8e-176Initial program 58.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.9
Applied rewrites45.9%
Taylor expanded in z around 0
Applied rewrites32.7%
if -8e-176 < b < 3.30000000000000017e84Initial program 76.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in x around inf
Applied rewrites39.4%
if 3.30000000000000017e84 < b Initial program 66.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6464.5
Applied rewrites64.5%
Taylor expanded in y around 0
Applied rewrites51.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -22000000000000.0)
(* (* i b) t)
(if (<= b -8e-176)
(* (* j c) a)
(if (<= b 3.3e+84) (* (* y x) z) (* (* i t) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -22000000000000.0) {
tmp = (i * b) * t;
} else if (b <= -8e-176) {
tmp = (j * c) * a;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = (i * t) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: tmp
if (b <= (-22000000000000.0d0)) then
tmp = (i * b) * t
else if (b <= (-8d-176)) then
tmp = (j * c) * a
else if (b <= 3.3d+84) then
tmp = (y * x) * z
else
tmp = (i * t) * b
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 tmp;
if (b <= -22000000000000.0) {
tmp = (i * b) * t;
} else if (b <= -8e-176) {
tmp = (j * c) * a;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = (i * t) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -22000000000000.0: tmp = (i * b) * t elif b <= -8e-176: tmp = (j * c) * a elif b <= 3.3e+84: tmp = (y * x) * z else: tmp = (i * t) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -22000000000000.0) tmp = Float64(Float64(i * b) * t); elseif (b <= -8e-176) tmp = Float64(Float64(j * c) * a); elseif (b <= 3.3e+84) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(i * t) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -22000000000000.0) tmp = (i * b) * t; elseif (b <= -8e-176) tmp = (j * c) * a; elseif (b <= 3.3e+84) tmp = (y * x) * z; else tmp = (i * t) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -22000000000000.0], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, -8e-176], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 3.3e+84], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -22000000000000:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;b \leq -8 \cdot 10^{-176}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -2.2e13Initial program 72.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Taylor expanded in x around 0
Applied rewrites42.7%
if -2.2e13 < b < -8e-176Initial program 58.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.9
Applied rewrites45.9%
Taylor expanded in z around 0
Applied rewrites32.7%
if -8e-176 < b < 3.30000000000000017e84Initial program 76.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in x around inf
Applied rewrites39.4%
if 3.30000000000000017e84 < b Initial program 66.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6464.5
Applied rewrites64.5%
Taylor expanded in y around 0
Applied rewrites48.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* i t) b)))
(if (<= b -22000000000000.0)
t_1
(if (<= b -8e-176) (* (* j c) a) (if (<= b 3.3e+84) (* (* y x) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) * b;
double tmp;
if (b <= -22000000000000.0) {
tmp = t_1;
} else if (b <= -8e-176) {
tmp = (j * c) * a;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: t_1
real(8) :: tmp
t_1 = (i * t) * b
if (b <= (-22000000000000.0d0)) then
tmp = t_1
else if (b <= (-8d-176)) then
tmp = (j * c) * a
else if (b <= 3.3d+84) then
tmp = (y * x) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) * b;
double tmp;
if (b <= -22000000000000.0) {
tmp = t_1;
} else if (b <= -8e-176) {
tmp = (j * c) * a;
} else if (b <= 3.3e+84) {
tmp = (y * x) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (i * t) * b tmp = 0 if b <= -22000000000000.0: tmp = t_1 elif b <= -8e-176: tmp = (j * c) * a elif b <= 3.3e+84: tmp = (y * x) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * t) * b) tmp = 0.0 if (b <= -22000000000000.0) tmp = t_1; elseif (b <= -8e-176) tmp = Float64(Float64(j * c) * a); elseif (b <= 3.3e+84) tmp = Float64(Float64(y * x) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (i * t) * b; tmp = 0.0; if (b <= -22000000000000.0) tmp = t_1; elseif (b <= -8e-176) tmp = (j * c) * a; elseif (b <= 3.3e+84) tmp = (y * x) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -22000000000000.0], t$95$1, If[LessEqual[b, -8e-176], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 3.3e+84], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -22000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -8 \cdot 10^{-176}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.2e13 or 3.30000000000000017e84 < b Initial program 69.8%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6454.7
Applied rewrites54.7%
Taylor expanded in y around 0
Applied rewrites44.0%
if -2.2e13 < b < -8e-176Initial program 58.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.9
Applied rewrites45.9%
Taylor expanded in z around 0
Applied rewrites32.7%
if -8e-176 < b < 3.30000000000000017e84Initial program 76.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6445.2
Applied rewrites45.2%
Taylor expanded in x around inf
Applied rewrites39.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* i t) b)))
(if (<= b -22000000000000.0)
t_1
(if (<= b -6.2e-197)
(* (* j c) a)
(if (<= b 3.3e+84) (* (* z x) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) * b;
double tmp;
if (b <= -22000000000000.0) {
tmp = t_1;
} else if (b <= -6.2e-197) {
tmp = (j * c) * a;
} else if (b <= 3.3e+84) {
tmp = (z * x) * y;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: t_1
real(8) :: tmp
t_1 = (i * t) * b
if (b <= (-22000000000000.0d0)) then
tmp = t_1
else if (b <= (-6.2d-197)) then
tmp = (j * c) * a
else if (b <= 3.3d+84) then
tmp = (z * x) * y
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) * b;
double tmp;
if (b <= -22000000000000.0) {
tmp = t_1;
} else if (b <= -6.2e-197) {
tmp = (j * c) * a;
} else if (b <= 3.3e+84) {
tmp = (z * x) * y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (i * t) * b tmp = 0 if b <= -22000000000000.0: tmp = t_1 elif b <= -6.2e-197: tmp = (j * c) * a elif b <= 3.3e+84: tmp = (z * x) * y else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * t) * b) tmp = 0.0 if (b <= -22000000000000.0) tmp = t_1; elseif (b <= -6.2e-197) tmp = Float64(Float64(j * c) * a); elseif (b <= 3.3e+84) tmp = Float64(Float64(z * x) * y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (i * t) * b; tmp = 0.0; if (b <= -22000000000000.0) tmp = t_1; elseif (b <= -6.2e-197) tmp = (j * c) * a; elseif (b <= 3.3e+84) tmp = (z * x) * y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -22000000000000.0], t$95$1, If[LessEqual[b, -6.2e-197], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 3.3e+84], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -22000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{-197}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;b \leq 3.3 \cdot 10^{+84}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -2.2e13 or 3.30000000000000017e84 < b Initial program 69.8%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6454.7
Applied rewrites54.7%
Taylor expanded in y around 0
Applied rewrites44.0%
if -2.2e13 < b < -6.20000000000000057e-197Initial program 62.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6448.1
Applied rewrites48.1%
Taylor expanded in z around 0
Applied rewrites34.0%
if -6.20000000000000057e-197 < b < 3.30000000000000017e84Initial program 75.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.5
Applied rewrites43.5%
Taylor expanded in x around inf
Applied rewrites36.1%
Applied rewrites39.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -1.2e-19) (not (<= b 3.3e+84))) (* (* i t) b) (* (* z x) y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -1.2e-19) || !(b <= 3.3e+84)) {
tmp = (i * t) * b;
} else {
tmp = (z * x) * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: tmp
if ((b <= (-1.2d-19)) .or. (.not. (b <= 3.3d+84))) then
tmp = (i * t) * b
else
tmp = (z * x) * y
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 tmp;
if ((b <= -1.2e-19) || !(b <= 3.3e+84)) {
tmp = (i * t) * b;
} else {
tmp = (z * x) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (b <= -1.2e-19) or not (b <= 3.3e+84): tmp = (i * t) * b else: tmp = (z * x) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -1.2e-19) || !(b <= 3.3e+84)) tmp = Float64(Float64(i * t) * b); else tmp = Float64(Float64(z * x) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((b <= -1.2e-19) || ~((b <= 3.3e+84))) tmp = (i * t) * b; else tmp = (z * x) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -1.2e-19], N[Not[LessEqual[b, 3.3e+84]], $MachinePrecision]], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{-19} \lor \neg \left(b \leq 3.3 \cdot 10^{+84}\right):\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if b < -1.20000000000000011e-19 or 3.30000000000000017e84 < b Initial program 69.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6452.8
Applied rewrites52.8%
Taylor expanded in y around 0
Applied rewrites42.2%
if -1.20000000000000011e-19 < b < 3.30000000000000017e84Initial program 73.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.2
Applied rewrites41.2%
Taylor expanded in x around inf
Applied rewrites32.9%
Applied rewrites34.8%
Final simplification38.4%
(FPCore (x y z t a b c i j) :precision binary64 (* (* z x) y))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * x) * y;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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
code = (z * x) * y
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * x) * y;
}
def code(x, y, z, t, a, b, c, i, j): return (z * x) * y
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(z * x) * y) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (z * x) * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot x\right) \cdot y
\end{array}
Initial program 71.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.3
Applied rewrites42.3%
Taylor expanded in x around inf
Applied rewrites25.4%
Applied rewrites24.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2
(+
(-
(* x (- (* y z) (* t a)))
(/
(* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
(+ (* c z) (* t i))))
t_1)))
(if (< x -1.469694296777705e-64)
t_2
(if (< x 3.2113527362226803e-147)
(- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * ((c * a) - (y * i))
t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
if (x < (-1.469694296777705d-64)) then
tmp = t_2
else if (x < 3.2113527362226803d-147) then
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1 tmp = 0 if x < -1.469694296777705e-64: tmp = t_2 elif x < 3.2113527362226803e-147: tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1) tmp = 0.0 if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * a) - (y * i)); t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1; tmp = 0.0; if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024318
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:alt
(! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))