
(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 18 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
(let* ((t_1
(*
(fma
(- x)
z
(fma
j
i
(/ (fma (fma (- c) j (* t x)) a (* (fma (- i) t (* c z)) b)) y)))
(- y)))
(t_2
(-
(* (- (* c a) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i t) (* c z)) b)))))
(if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 1e+306) t_2 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(-x, z, fma(j, i, (fma(fma(-c, j, (t * x)), a, (fma(-i, t, (c * z)) * b)) / y))) * -y;
double t_2 = (((c * a) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * t) - (c * z)) * b));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 1e+306) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), z, fma(j, i, Float64(fma(fma(Float64(-c), j, Float64(t * x)), a, Float64(fma(Float64(-i), t, Float64(c * z)) * b)) / y))) * Float64(-y)) t_2 = Float64(Float64(Float64(Float64(c * a) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * t) - Float64(c * z)) * b))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= 1e+306) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * z + N[(j * i + N[(N[(N[((-c) * j + N[(t * x), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * t + N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (-y)), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 1e+306], t$95$2, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, z, \mathsf{fma}\left(j, i, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-c, j, t \cdot x\right), a, \mathsf{fma}\left(-i, t, c \cdot z\right) \cdot b\right)}{y}\right)\right) \cdot \left(-y\right)\\
t_2 := \left(c \cdot a - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot t - c \cdot z\right) \cdot b\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+306}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\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.0 or 1.00000000000000002e306 < (+.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 62.4%
Taylor expanded in y around -inf
Applied rewrites83.1%
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)))) < 1.00000000000000002e306Initial program 99.5%
Final simplification88.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(-
(* (- (* c a) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i t) (* c z)) b)))))
(if (<= t_1 INFINITY) t_1 (* (* (/ (fma (- b) i (* a x)) y) t) (- y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (((c * a) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * t) - (c * z)) * b));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = ((fma(-b, i, (a * x)) / y) * t) * -y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(c * a) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * t) - Float64(c * z)) * b))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(Float64(fma(Float64(-b), i, Float64(a * x)) / y) * t) * Float64(-y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(N[(N[((-b) * i + N[(a * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] * t), $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot t - c \cdot z\right) \cdot b\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{\mathsf{fma}\left(-b, i, a \cdot x\right)}{y} \cdot t\right) \cdot \left(-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 89.0%
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 y around -inf
Applied rewrites63.6%
Taylor expanded in t around inf
Applied rewrites59.6%
Final simplification84.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- z) c (* i t))))
(if (<= b -1e+242)
(* t_1 b)
(if (<= b 9.2e+143)
(fma
(fma (- i) y (* c a))
j
(fma (fma (- x) a (* i b)) t (* (fma (- c) b (* y x)) z)))
(fma t_1 b (* (fma (- x) t (* j c)) a))))))
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));
double tmp;
if (b <= -1e+242) {
tmp = t_1 * b;
} else if (b <= 9.2e+143) {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-x, a, (i * b)), t, (fma(-c, b, (y * x)) * z)));
} else {
tmp = fma(t_1, b, (fma(-x, t, (j * c)) * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-z), c, Float64(i * t)) tmp = 0.0 if (b <= -1e+242) tmp = Float64(t_1 * b); elseif (b <= 9.2e+143) 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(t_1, b, Float64(fma(Float64(-x), t, Float64(j * c)) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+242], N[(t$95$1 * b), $MachinePrecision], If[LessEqual[b, 9.2e+143], 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[(t$95$1 * b + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, c, i \cdot t\right)\\
\mathbf{if}\;b \leq -1 \cdot 10^{+242}:\\
\;\;\;\;t\_1 \cdot b\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+143}:\\
\;\;\;\;\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(t\_1, b, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\\
\end{array}
\end{array}
if b < -1.00000000000000005e242Initial program 68.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-*.f6489.3
Applied rewrites89.3%
if -1.00000000000000005e242 < b < 9.1999999999999999e143Initial program 74.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 rewrites79.2%
if 9.1999999999999999e143 < b Initial program 72.7%
Taylor expanded in y 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 rewrites84.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- y) j (* b t)) i)))
(if (<= i -1e+82)
t_1
(if (<= i 3.7e+124)
(fma (fma (- z) c (* i t)) b (* (fma (- x) t (* j c)) a))
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(-y, j, (b * t)) * i;
double tmp;
if (i <= -1e+82) {
tmp = t_1;
} else if (i <= 3.7e+124) {
tmp = fma(fma(-z, c, (i * t)), b, (fma(-x, t, (j * c)) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-y), j, Float64(b * t)) * i) tmp = 0.0 if (i <= -1e+82) tmp = t_1; elseif (i <= 3.7e+124) tmp = fma(fma(Float64(-z), c, Float64(i * t)), b, Float64(fma(Float64(-x), t, Float64(j * c)) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -1e+82], t$95$1, If[LessEqual[i, 3.7e+124], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{if}\;i \leq -1 \cdot 10^{+82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 3.7 \cdot 10^{+124}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, c, i \cdot t\right), b, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -9.9999999999999996e81 or 3.70000000000000008e124 < i Initial program 62.8%
Taylor expanded in i 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
lower-*.f6474.0
Applied rewrites74.0%
if -9.9999999999999996e81 < i < 3.70000000000000008e124Initial program 78.6%
Taylor expanded in y 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.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- y) j (* b t)) i)))
(if (<= i -1.95e+129)
t_1
(if (<= i 2.75e-81)
(fma (fma (- z) b (* j a)) c (* (fma (- t) a (* z y)) x))
(if (<= i 1.02e+123)
(fma (* i t) b (* (fma (- x) t (* j c)) a))
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(-y, j, (b * t)) * i;
double tmp;
if (i <= -1.95e+129) {
tmp = t_1;
} else if (i <= 2.75e-81) {
tmp = fma(fma(-z, b, (j * a)), c, (fma(-t, a, (z * y)) * x));
} else if (i <= 1.02e+123) {
tmp = fma((i * t), b, (fma(-x, t, (j * c)) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-y), j, Float64(b * t)) * i) tmp = 0.0 if (i <= -1.95e+129) tmp = t_1; elseif (i <= 2.75e-81) tmp = fma(fma(Float64(-z), b, Float64(j * a)), c, Float64(fma(Float64(-t), a, Float64(z * y)) * x)); elseif (i <= 1.02e+123) tmp = fma(Float64(i * t), b, Float64(fma(Float64(-x), t, Float64(j * c)) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -1.95e+129], t$95$1, If[LessEqual[i, 2.75e-81], N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.02e+123], N[(N[(i * t), $MachinePrecision] * b + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{if}\;i \leq -1.95 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 2.75 \cdot 10^{-81}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, b, j \cdot a\right), c, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\mathbf{elif}\;i \leq 1.02 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t, b, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.9499999999999999e129 or 1.02e123 < i Initial program 60.8%
Taylor expanded in i 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
lower-*.f6476.4
Applied rewrites76.4%
if -1.9499999999999999e129 < i < 2.75000000000000013e-81Initial program 80.1%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
Applied rewrites71.7%
if 2.75000000000000013e-81 < i < 1.02e123Initial program 74.6%
Taylor expanded in y 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.0%
Taylor expanded in z around 0
Applied rewrites72.0%
Final simplification73.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -2.7e+64)
(* (fma (- z) c (* i t)) b)
(if (<= b 1.4e-31)
(+ (* (* z x) y) (* (- (* c a) (* i y)) j))
(fma (* i t) b (* (fma (- x) t (* j c)) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -2.7e+64) {
tmp = fma(-z, c, (i * t)) * b;
} else if (b <= 1.4e-31) {
tmp = ((z * x) * y) + (((c * a) - (i * y)) * j);
} else {
tmp = fma((i * t), b, (fma(-x, t, (j * c)) * a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -2.7e+64) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); elseif (b <= 1.4e-31) tmp = Float64(Float64(Float64(z * x) * y) + Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); else tmp = fma(Float64(i * t), b, Float64(fma(Float64(-x), t, Float64(j * c)) * a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -2.7e+64], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 1.4e-31], N[(N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision] + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.7 \cdot 10^{+64}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-31}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y + \left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t, b, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\\
\end{array}
\end{array}
if b < -2.7e64Initial program 75.0%
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-*.f6472.0
Applied rewrites72.0%
if -2.7e64 < b < 1.3999999999999999e-31Initial program 73.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6467.8
Applied rewrites67.8%
if 1.3999999999999999e-31 < b Initial program 74.0%
Taylor expanded in y 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 rewrites77.0%
Taylor expanded in z around 0
Applied rewrites63.6%
Final simplification67.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- y) j (* b t)) i)))
(if (<= i -1000000.0)
t_1
(if (<= i 1.02e+123) (fma (* i t) b (* (fma (- x) t (* j c)) a)) 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(-y, j, (b * t)) * i;
double tmp;
if (i <= -1000000.0) {
tmp = t_1;
} else if (i <= 1.02e+123) {
tmp = fma((i * t), b, (fma(-x, t, (j * c)) * a));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-y), j, Float64(b * t)) * i) tmp = 0.0 if (i <= -1000000.0) tmp = t_1; elseif (i <= 1.02e+123) tmp = fma(Float64(i * t), b, Float64(fma(Float64(-x), t, Float64(j * c)) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -1000000.0], t$95$1, If[LessEqual[i, 1.02e+123], N[(N[(i * t), $MachinePrecision] * b + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{if}\;i \leq -1000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.02 \cdot 10^{+123}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot t, b, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1e6 or 1.02e123 < i Initial program 66.2%
Taylor expanded in i 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
lower-*.f6468.6
Applied rewrites68.6%
if -1e6 < i < 1.02e123Initial program 78.4%
Taylor expanded in y 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 rewrites76.2%
Taylor expanded in z around 0
Applied rewrites65.7%
Final simplification66.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= i -1.8e+22)
(* (* (- i) j) y)
(if (<= i -4.9e-143)
(* (* c a) j)
(if (<= i 5.6e-81)
(* (* (- t) x) a)
(if (<= i 2.45e+124) (* (* i t) b) (* (* (- j) y) i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.8e+22) {
tmp = (-i * j) * y;
} else if (i <= -4.9e-143) {
tmp = (c * a) * j;
} else if (i <= 5.6e-81) {
tmp = (-t * x) * a;
} else if (i <= 2.45e+124) {
tmp = (i * t) * b;
} else {
tmp = (-j * y) * 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 (i <= (-1.8d+22)) then
tmp = (-i * j) * y
else if (i <= (-4.9d-143)) then
tmp = (c * a) * j
else if (i <= 5.6d-81) then
tmp = (-t * x) * a
else if (i <= 2.45d+124) then
tmp = (i * t) * b
else
tmp = (-j * y) * 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 (i <= -1.8e+22) {
tmp = (-i * j) * y;
} else if (i <= -4.9e-143) {
tmp = (c * a) * j;
} else if (i <= 5.6e-81) {
tmp = (-t * x) * a;
} else if (i <= 2.45e+124) {
tmp = (i * t) * b;
} else {
tmp = (-j * y) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -1.8e+22: tmp = (-i * j) * y elif i <= -4.9e-143: tmp = (c * a) * j elif i <= 5.6e-81: tmp = (-t * x) * a elif i <= 2.45e+124: tmp = (i * t) * b else: tmp = (-j * y) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -1.8e+22) tmp = Float64(Float64(Float64(-i) * j) * y); elseif (i <= -4.9e-143) tmp = Float64(Float64(c * a) * j); elseif (i <= 5.6e-81) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (i <= 2.45e+124) tmp = Float64(Float64(i * t) * b); else tmp = Float64(Float64(Float64(-j) * y) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -1.8e+22) tmp = (-i * j) * y; elseif (i <= -4.9e-143) tmp = (c * a) * j; elseif (i <= 5.6e-81) tmp = (-t * x) * a; elseif (i <= 2.45e+124) tmp = (i * t) * b; else tmp = (-j * y) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -1.8e+22], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[i, -4.9e-143], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[i, 5.6e-81], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[i, 2.45e+124], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], N[(N[((-j) * y), $MachinePrecision] * i), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.8 \cdot 10^{+22}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{elif}\;i \leq -4.9 \cdot 10^{-143}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;i \leq 5.6 \cdot 10^{-81}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;i \leq 2.45 \cdot 10^{+124}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\
\end{array}
\end{array}
if i < -1.8e22Initial program 70.4%
Taylor expanded in y around -inf
Applied rewrites71.1%
Taylor expanded in y around inf
*-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-*.f6452.1
Applied rewrites52.1%
Taylor expanded in x around 0
Applied rewrites43.4%
if -1.8e22 < i < -4.9e-143Initial program 79.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-*.f6435.4
Applied rewrites35.4%
Taylor expanded in x around inf
Applied rewrites25.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6444.7
Applied rewrites44.7%
Taylor expanded in y around 0
Applied rewrites41.6%
if -4.9e-143 < i < 5.5999999999999998e-81Initial program 81.4%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.8
Applied rewrites59.8%
Taylor expanded in x around inf
Applied rewrites45.4%
if 5.5999999999999998e-81 < i < 2.45000000000000017e124Initial program 75.0%
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-*.f6449.9
Applied rewrites49.9%
Taylor expanded in z around 0
Applied rewrites37.6%
if 2.45000000000000017e124 < i Initial program 55.4%
Taylor expanded in y around -inf
Applied rewrites73.1%
Taylor expanded in y around inf
*-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-*.f6456.1
Applied rewrites56.1%
Taylor expanded in x around 0
Applied rewrites50.5%
Final simplification43.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* i t) b)))
(if (<= b -1.02e+65)
t_1
(if (<= b -2.05e-203)
(* (* c a) j)
(if (<= b 9.5e+35) (* (* (- j) y) i) 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 <= -1.02e+65) {
tmp = t_1;
} else if (b <= -2.05e-203) {
tmp = (c * a) * j;
} else if (b <= 9.5e+35) {
tmp = (-j * y) * i;
} 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 <= (-1.02d+65)) then
tmp = t_1
else if (b <= (-2.05d-203)) then
tmp = (c * a) * j
else if (b <= 9.5d+35) then
tmp = (-j * y) * i
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 <= -1.02e+65) {
tmp = t_1;
} else if (b <= -2.05e-203) {
tmp = (c * a) * j;
} else if (b <= 9.5e+35) {
tmp = (-j * y) * i;
} 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 <= -1.02e+65: tmp = t_1 elif b <= -2.05e-203: tmp = (c * a) * j elif b <= 9.5e+35: tmp = (-j * y) * i 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 <= -1.02e+65) tmp = t_1; elseif (b <= -2.05e-203) tmp = Float64(Float64(c * a) * j); elseif (b <= 9.5e+35) tmp = Float64(Float64(Float64(-j) * y) * i); 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 <= -1.02e+65) tmp = t_1; elseif (b <= -2.05e-203) tmp = (c * a) * j; elseif (b <= 9.5e+35) tmp = (-j * y) * i; 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, -1.02e+65], t$95$1, If[LessEqual[b, -2.05e-203], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[b, 9.5e+35], N[(N[((-j) * y), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -1.02 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.05 \cdot 10^{-203}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+35}:\\
\;\;\;\;\left(\left(-j\right) \cdot y\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.02000000000000005e65 or 9.50000000000000062e35 < b Initial program 74.0%
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-*.f6466.6
Applied rewrites66.6%
Taylor expanded in z around 0
Applied rewrites44.3%
if -1.02000000000000005e65 < b < -2.0499999999999999e-203Initial program 76.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-*.f6423.8
Applied rewrites23.8%
Taylor expanded in x around inf
Applied rewrites20.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6457.1
Applied rewrites57.1%
Taylor expanded in y around 0
Applied rewrites44.3%
if -2.0499999999999999e-203 < b < 9.50000000000000062e35Initial program 71.7%
Taylor expanded in y around -inf
Applied rewrites73.1%
Taylor expanded in y around inf
*-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-*.f6448.6
Applied rewrites48.6%
Taylor expanded in x around 0
Applied rewrites31.2%
Final simplification39.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- y) j (* b t)) i)))
(if (<= i -1.25e+16)
t_1
(if (<= i 0.00022) (* (fma (- x) t (* j c)) a) 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(-y, j, (b * t)) * i;
double tmp;
if (i <= -1.25e+16) {
tmp = t_1;
} else if (i <= 0.00022) {
tmp = fma(-x, t, (j * c)) * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-y), j, Float64(b * t)) * i) tmp = 0.0 if (i <= -1.25e+16) tmp = t_1; elseif (i <= 0.00022) tmp = Float64(fma(Float64(-x), t, Float64(j * c)) * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -1.25e+16], t$95$1, If[LessEqual[i, 0.00022], N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{if}\;i \leq -1.25 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 0.00022:\\
\;\;\;\;\mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.25e16 or 2.20000000000000008e-4 < i Initial program 67.1%
Taylor expanded in i 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
lower-*.f6466.3
Applied rewrites66.3%
if -1.25e16 < i < 2.20000000000000008e-4Initial program 80.1%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.1
Applied rewrites55.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) a (* i b)) t)))
(if (<= t -6.1e-27)
t_1
(if (<= t 4.2e+24) (* (fma a c (* (- i) y)) j) 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(-x, a, (i * b)) * t;
double tmp;
if (t <= -6.1e-27) {
tmp = t_1;
} else if (t <= 4.2e+24) {
tmp = fma(a, c, (-i * y)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), a, Float64(i * b)) * t) tmp = 0.0 if (t <= -6.1e-27) tmp = t_1; elseif (t <= 4.2e+24) tmp = Float64(fma(a, c, Float64(Float64(-i) * y)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -6.1e-27], t$95$1, If[LessEqual[t, 4.2e+24], N[(N[(a * c + N[((-i) * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{if}\;t \leq -6.1 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(a, c, \left(-i\right) \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.0999999999999999e-27 or 4.2000000000000003e24 < t Initial program 68.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-*.f6462.9
Applied rewrites62.9%
if -6.0999999999999999e-27 < t < 4.2000000000000003e24Initial program 79.7%
Taylor expanded in y around -inf
Applied rewrites78.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6452.8
Applied rewrites52.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma a c (* (- i) y)) j)))
(if (<= j -7.5e+46)
t_1
(if (<= j 1.35e+36) (* (fma (- c) b (* 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 = fma(a, c, (-i * y)) * j;
double tmp;
if (j <= -7.5e+46) {
tmp = t_1;
} else if (j <= 1.35e+36) {
tmp = fma(-c, b, (y * x)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(a, c, Float64(Float64(-i) * y)) * j) tmp = 0.0 if (j <= -7.5e+46) tmp = t_1; elseif (j <= 1.35e+36) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(a * c + N[((-i) * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -7.5e+46], t$95$1, If[LessEqual[j, 1.35e+36], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, c, \left(-i\right) \cdot y\right) \cdot j\\
\mathbf{if}\;j \leq -7.5 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.35 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -7.5000000000000003e46 or 1.35e36 < j Initial program 77.5%
Taylor expanded in y around -inf
Applied rewrites72.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6465.4
Applied rewrites65.4%
if -7.5000000000000003e46 < j < 1.35e36Initial program 70.6%
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-*.f6438.8
Applied rewrites38.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* i t) b)))
(if (<= b -1.1e+107)
t_1
(if (<= b 1.2e+133) (* (fma a c (* (- i) y)) j) 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 <= -1.1e+107) {
tmp = t_1;
} else if (b <= 1.2e+133) {
tmp = fma(a, c, (-i * y)) * j;
} 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 <= -1.1e+107) tmp = t_1; elseif (b <= 1.2e+133) tmp = Float64(fma(a, c, Float64(Float64(-i) * y)) * j); else tmp = t_1; end return 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, -1.1e+107], t$95$1, If[LessEqual[b, 1.2e+133], N[(N[(a * c + N[((-i) * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -1.1 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.2 \cdot 10^{+133}:\\
\;\;\;\;\mathsf{fma}\left(a, c, \left(-i\right) \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.1e107 or 1.1999999999999999e133 < b Initial program 72.6%
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-*.f6471.6
Applied rewrites71.6%
Taylor expanded in z around 0
Applied rewrites47.7%
if -1.1e107 < b < 1.1999999999999999e133Initial program 74.4%
Taylor expanded in y around -inf
Applied rewrites77.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
lower-fma.f64N/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6447.7
Applied rewrites47.7%
Final simplification47.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* i t) b))) (if (<= b -1.02e+65) t_1 (if (<= b 1.52e-24) (* (* c a) j) 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 <= -1.02e+65) {
tmp = t_1;
} else if (b <= 1.52e-24) {
tmp = (c * a) * j;
} 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 <= (-1.02d+65)) then
tmp = t_1
else if (b <= 1.52d-24) then
tmp = (c * a) * j
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 <= -1.02e+65) {
tmp = t_1;
} else if (b <= 1.52e-24) {
tmp = (c * a) * j;
} 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 <= -1.02e+65: tmp = t_1 elif b <= 1.52e-24: tmp = (c * a) * j 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 <= -1.02e+65) tmp = t_1; elseif (b <= 1.52e-24) tmp = Float64(Float64(c * a) * j); 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 <= -1.02e+65) tmp = t_1; elseif (b <= 1.52e-24) tmp = (c * a) * j; 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, -1.02e+65], t$95$1, If[LessEqual[b, 1.52e-24], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -1.02 \cdot 10^{+65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.52 \cdot 10^{-24}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.02000000000000005e65 or 1.51999999999999992e-24 < b Initial program 74.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-*.f6463.7
Applied rewrites63.7%
Taylor expanded in z around 0
Applied rewrites42.2%
if -1.02000000000000005e65 < b < 1.51999999999999992e-24Initial program 73.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-*.f6426.6
Applied rewrites26.6%
Taylor expanded in x around inf
Applied rewrites24.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6450.9
Applied rewrites50.9%
Taylor expanded in y around 0
Applied rewrites32.4%
Final simplification37.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c -8.2e-7) (* (* c a) j) (if (<= c 9.2e-113) (* (* y x) z) (* (* j c) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -8.2e-7) {
tmp = (c * a) * j;
} else if (c <= 9.2e-113) {
tmp = (y * x) * z;
} else {
tmp = (j * c) * a;
}
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 (c <= (-8.2d-7)) then
tmp = (c * a) * j
else if (c <= 9.2d-113) then
tmp = (y * x) * z
else
tmp = (j * c) * a
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 (c <= -8.2e-7) {
tmp = (c * a) * j;
} else if (c <= 9.2e-113) {
tmp = (y * x) * z;
} else {
tmp = (j * c) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -8.2e-7: tmp = (c * a) * j elif c <= 9.2e-113: tmp = (y * x) * z else: tmp = (j * c) * a return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -8.2e-7) tmp = Float64(Float64(c * a) * j); elseif (c <= 9.2e-113) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(j * c) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -8.2e-7) tmp = (c * a) * j; elseif (c <= 9.2e-113) tmp = (y * x) * z; else tmp = (j * c) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -8.2e-7], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[c, 9.2e-113], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.2 \cdot 10^{-7}:\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{-113}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\end{array}
\end{array}
if c < -8.1999999999999998e-7Initial program 65.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-*.f6433.1
Applied rewrites33.1%
Taylor expanded in x around inf
Applied rewrites7.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6445.6
Applied rewrites45.6%
Taylor expanded in y around 0
Applied rewrites41.3%
if -8.1999999999999998e-7 < c < 9.20000000000000032e-113Initial program 82.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-*.f6430.1
Applied rewrites30.1%
Taylor expanded in x around inf
Applied rewrites26.3%
if 9.20000000000000032e-113 < c Initial program 69.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/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 x around 0
Applied rewrites29.4%
Final simplification31.0%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* c a) j))) (if (<= c -8.2e-7) t_1 (if (<= c 9.2e-113) (* (* 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 = (c * a) * j;
double tmp;
if (c <= -8.2e-7) {
tmp = t_1;
} else if (c <= 9.2e-113) {
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 = (c * a) * j
if (c <= (-8.2d-7)) then
tmp = t_1
else if (c <= 9.2d-113) 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 = (c * a) * j;
double tmp;
if (c <= -8.2e-7) {
tmp = t_1;
} else if (c <= 9.2e-113) {
tmp = (y * x) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (c * a) * j tmp = 0 if c <= -8.2e-7: tmp = t_1 elif c <= 9.2e-113: 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(c * a) * j) tmp = 0.0 if (c <= -8.2e-7) tmp = t_1; elseif (c <= 9.2e-113) 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 = (c * a) * j; tmp = 0.0; if (c <= -8.2e-7) tmp = t_1; elseif (c <= 9.2e-113) 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[(c * a), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[c, -8.2e-7], t$95$1, If[LessEqual[c, 9.2e-113], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a\right) \cdot j\\
\mathbf{if}\;c \leq -8.2 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{-113}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -8.1999999999999998e-7 or 9.20000000000000032e-113 < c Initial program 68.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-*.f6431.2
Applied rewrites31.2%
Taylor expanded in x around inf
Applied rewrites12.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6443.2
Applied rewrites43.2%
Taylor expanded in y around 0
Applied rewrites33.5%
if -8.1999999999999998e-7 < c < 9.20000000000000032e-113Initial program 82.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-*.f6430.1
Applied rewrites30.1%
Taylor expanded in x around inf
Applied rewrites26.3%
Final simplification30.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* c a) j))) (if (<= c -8.2e-7) t_1 (if (<= c 1.65e-59) (* (* 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 = (c * a) * j;
double tmp;
if (c <= -8.2e-7) {
tmp = t_1;
} else if (c <= 1.65e-59) {
tmp = (z * y) * x;
} 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 = (c * a) * j
if (c <= (-8.2d-7)) then
tmp = t_1
else if (c <= 1.65d-59) then
tmp = (z * y) * x
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 = (c * a) * j;
double tmp;
if (c <= -8.2e-7) {
tmp = t_1;
} else if (c <= 1.65e-59) {
tmp = (z * y) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (c * a) * j tmp = 0 if c <= -8.2e-7: tmp = t_1 elif c <= 1.65e-59: tmp = (z * y) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(c * a) * j) tmp = 0.0 if (c <= -8.2e-7) tmp = t_1; elseif (c <= 1.65e-59) tmp = Float64(Float64(z * y) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (c * a) * j; tmp = 0.0; if (c <= -8.2e-7) tmp = t_1; elseif (c <= 1.65e-59) tmp = (z * y) * x; 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[(c * a), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[c, -8.2e-7], t$95$1, If[LessEqual[c, 1.65e-59], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a\right) \cdot j\\
\mathbf{if}\;c \leq -8.2 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 1.65 \cdot 10^{-59}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -8.1999999999999998e-7 or 1.64999999999999991e-59 < c 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-*.f6432.4
Applied rewrites32.4%
Taylor expanded in x around inf
Applied rewrites11.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6444.1
Applied rewrites44.1%
Taylor expanded in y around 0
Applied rewrites34.9%
if -8.1999999999999998e-7 < c < 1.64999999999999991e-59Initial program 82.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-*.f6428.7
Applied rewrites28.7%
Taylor expanded in x around inf
Applied rewrites24.5%
(FPCore (x y z t a b c i j) :precision binary64 (* (* z y) x))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * y) * x;
}
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 * y) * x
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 * y) * x;
}
def code(x, y, z, t, a, b, c, i, j): return (z * y) * x
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(z * y) * x) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (z * y) * x; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot y\right) \cdot x
\end{array}
Initial 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-*.f6430.8
Applied rewrites30.8%
Taylor expanded in x around inf
Applied rewrites17.1%
(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 2024296
(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)))))