
(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 20 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 (<= t -2.6e+89)
(*
(fma
(- x)
a
(fma
(/ (fma (- i) y (* c a)) t)
j
(+ (* i b) (/ (* (fma (- c) b (* y x)) z) t))))
t)
(fma
(fma (- c) z (* i t))
b
(fma (fma (- j) i (* z x)) y (* (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 (t <= -2.6e+89) {
tmp = fma(-x, a, fma((fma(-i, y, (c * a)) / t), j, ((i * b) + ((fma(-c, b, (y * x)) * z) / t)))) * t;
} else {
tmp = fma(fma(-c, z, (i * t)), b, fma(fma(-j, i, (z * x)), y, (fma(-x, t, (j * c)) * a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -2.6e+89) tmp = Float64(fma(Float64(-x), a, fma(Float64(fma(Float64(-i), y, Float64(c * a)) / t), j, Float64(Float64(i * b) + Float64(Float64(fma(Float64(-c), b, Float64(y * x)) * z) / t)))) * t); else tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, fma(fma(Float64(-j), i, Float64(z * x)), y, 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[t, -2.6e+89], N[(N[((-x) * a + N[(N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * j + N[(N[(i * b), $MachinePrecision] + N[(N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+89}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, \mathsf{fma}\left(\frac{\mathsf{fma}\left(-i, y, c \cdot a\right)}{t}, j, i \cdot b + \frac{\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z}{t}\right)\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\right)\\
\end{array}
\end{array}
if t < -2.6000000000000001e89Initial program 54.7%
Taylor expanded in t around inf
Applied rewrites92.8%
if -2.6000000000000001e89 < t Initial program 76.4%
Taylor expanded in a around 0
Applied rewrites84.3%
Final simplification85.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(fma
(fma (- c) z (* i t))
b
(fma (fma (- j) i (* z x)) y (* (fma (- x) t (* j c)) a))))
(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 2e+300) 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(fma(-c, z, (i * t)), b, fma(fma(-j, i, (z * x)), y, (fma(-x, t, (j * c)) * a)));
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 <= 2e+300) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(fma(Float64(-c), z, Float64(i * t)), b, fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(fma(Float64(-x), t, Float64(j * c)) * a))) 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 <= 2e+300) 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[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $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, 2e+300], t$95$2, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\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 2 \cdot 10^{+300}:\\
\;\;\;\;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 2.0000000000000001e300 < (+.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 60.5%
Taylor expanded in a around 0
Applied rewrites78.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)))) < 2.0000000000000001e300Initial program 99.7%
Final simplification85.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- c) z (* i t))))
(if (<= z -3.6e+219)
(* (fma (- c) b (* y x)) z)
(if (<= z -9.6e-36)
(fma (fma (- j) i (* z x)) y (* t_1 b))
(if (<= z 5.3e-107)
(fma (fma (- x) a (* i b)) t (* (fma (- i) y (* c a)) j))
(fma t_1 b (* (* (- (/ (* z x) i) j) y) i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-c, z, (i * t));
double tmp;
if (z <= -3.6e+219) {
tmp = fma(-c, b, (y * x)) * z;
} else if (z <= -9.6e-36) {
tmp = fma(fma(-j, i, (z * x)), y, (t_1 * b));
} else if (z <= 5.3e-107) {
tmp = fma(fma(-x, a, (i * b)), t, (fma(-i, y, (c * a)) * j));
} else {
tmp = fma(t_1, b, (((((z * x) / i) - j) * y) * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-c), z, Float64(i * t)) tmp = 0.0 if (z <= -3.6e+219) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (z <= -9.6e-36) tmp = fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(t_1 * b)); elseif (z <= 5.3e-107) tmp = fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(fma(Float64(-i), y, Float64(c * a)) * j)); else tmp = fma(t_1, b, Float64(Float64(Float64(Float64(Float64(z * x) / i) - j) * y) * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+219], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, -9.6e-36], N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(t$95$1 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.3e-107], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * b + N[(N[(N[(N[(N[(z * x), $MachinePrecision] / i), $MachinePrecision] - j), $MachinePrecision] * y), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-c, z, i \cdot t\right)\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+219}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{-36}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, t\_1 \cdot b\right)\\
\mathbf{elif}\;z \leq 5.3 \cdot 10^{-107}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, b, \left(\left(\frac{z \cdot x}{i} - j\right) \cdot y\right) \cdot i\right)\\
\end{array}
\end{array}
if z < -3.60000000000000006e219Initial 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-*.f6480.4
Applied rewrites80.4%
if -3.60000000000000006e219 < z < -9.6e-36Initial program 73.5%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites82.4%
if -9.6e-36 < z < 5.3e-107Initial program 82.0%
Taylor expanded in z around 0
Applied rewrites78.0%
if 5.3e-107 < z Initial program 63.1%
Taylor expanded in a around 0
Applied rewrites79.9%
Taylor expanded in i around inf
Applied rewrites77.3%
Taylor expanded in a around 0
Applied rewrites70.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x 2.9e+171)
(fma
(fma (- c) z (* i t))
b
(fma (fma (- j) i (* z x)) y (* (fma (- x) t (* j c)) a)))
(* (fma (- a) t (* 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 <= 2.9e+171) {
tmp = fma(fma(-c, z, (i * t)), b, fma(fma(-j, i, (z * x)), y, (fma(-x, t, (j * c)) * a)));
} else {
tmp = fma(-a, t, (z * y)) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= 2.9e+171) tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(fma(Float64(-x), t, Float64(j * c)) * a))); else tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, 2.9e+171], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.9 \cdot 10^{+171}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if x < 2.89999999999999985e171Initial program 73.9%
Taylor expanded in a around 0
Applied rewrites83.4%
if 2.89999999999999985e171 < x Initial program 63.2%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6486.0
Applied rewrites86.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- (* i y) (* c a)) j)))
(if (<= j -3.4e+21)
(- (* (* (- a) t) x) t_1)
(if (<= j 1.02e-153)
(* (fma (- c) b (* y x)) z)
(if (<= j 7.8e+94)
(fma (fma (- x) a (* i b)) t (* (* (- y) i) j))
(- (* (* (- b) z) c) 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 * y) - (c * a)) * j;
double tmp;
if (j <= -3.4e+21) {
tmp = ((-a * t) * x) - t_1;
} else if (j <= 1.02e-153) {
tmp = fma(-c, b, (y * x)) * z;
} else if (j <= 7.8e+94) {
tmp = fma(fma(-x, a, (i * b)), t, ((-y * i) * j));
} else {
tmp = ((-b * z) * c) - t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(i * y) - Float64(c * a)) * j) tmp = 0.0 if (j <= -3.4e+21) tmp = Float64(Float64(Float64(Float64(-a) * t) * x) - t_1); elseif (j <= 1.02e-153) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (j <= 7.8e+94) tmp = fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(Float64(Float64(-y) * i) * j)); else tmp = Float64(Float64(Float64(Float64(-b) * z) * c) - t_1); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(i * y), $MachinePrecision] - N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -3.4e+21], N[(N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[j, 1.02e-153], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 7.8e+94], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot y - c \cdot a\right) \cdot j\\
\mathbf{if}\;j \leq -3.4 \cdot 10^{+21}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x - t\_1\\
\mathbf{elif}\;j \leq 1.02 \cdot 10^{-153}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;j \leq 7.8 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \left(\left(-y\right) \cdot i\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c - t\_1\\
\end{array}
\end{array}
if j < -3.4e21Initial program 77.5%
Taylor expanded in a around inf
mul-1-negN/A
*-commutativeN/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6478.2
Applied rewrites78.2%
if -3.4e21 < j < 1.02e-153Initial program 61.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-*.f6460.6
Applied rewrites60.6%
if 1.02e-153 < j < 7.79999999999999971e94Initial program 83.5%
Taylor expanded in z around 0
Applied rewrites68.9%
Taylor expanded in c around 0
Applied rewrites65.6%
if 7.79999999999999971e94 < j Initial program 81.8%
Taylor expanded in c around inf
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6472.8
Applied rewrites72.8%
Final simplification67.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j a)) c)))
(if (<= c -6.8e+170)
t_1
(if (<= c -2.2e+87)
(* (fma (- c) b (* y x)) z)
(if (<= c 4.6e-29)
(fma (fma (- x) a (* i b)) t (* (* (- y) i) 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(-b, z, (j * a)) * c;
double tmp;
if (c <= -6.8e+170) {
tmp = t_1;
} else if (c <= -2.2e+87) {
tmp = fma(-c, b, (y * x)) * z;
} else if (c <= 4.6e-29) {
tmp = fma(fma(-x, a, (i * b)), t, ((-y * i) * j));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -6.8e+170) tmp = t_1; elseif (c <= -2.2e+87) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (c <= 4.6e-29) tmp = fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(Float64(Float64(-y) * i) * 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[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -6.8e+170], t$95$1, If[LessEqual[c, -2.2e+87], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 4.6e-29], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -6.8 \cdot 10^{+170}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -2.2 \cdot 10^{+87}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;c \leq 4.6 \cdot 10^{-29}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \left(\left(-y\right) \cdot i\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.8000000000000003e170 or 4.59999999999999982e-29 < c Initial program 64.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6470.7
Applied rewrites70.7%
if -6.8000000000000003e170 < c < -2.2000000000000001e87Initial program 58.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-*.f6462.7
Applied rewrites62.7%
if -2.2000000000000001e87 < c < 4.59999999999999982e-29Initial program 80.5%
Taylor expanded in z around 0
Applied rewrites70.8%
Taylor expanded in c around 0
Applied rewrites66.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a -6.6e+34)
(* (fma (- x) t (* j c)) a)
(if (<= a -6.1e-120)
(* (* (- (/ (* y x) c) b) z) c)
(if (<= a 560000.0)
(fma (fma (- c) z (* i t)) b (* (* (- y) j) i))
(* (fma (- c) j (* x t)) (- a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (a <= -6.6e+34) {
tmp = fma(-x, t, (j * c)) * a;
} else if (a <= -6.1e-120) {
tmp = ((((y * x) / c) - b) * z) * c;
} else if (a <= 560000.0) {
tmp = fma(fma(-c, z, (i * t)), b, ((-y * j) * i));
} else {
tmp = fma(-c, j, (x * t)) * -a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -6.6e+34) tmp = Float64(fma(Float64(-x), t, Float64(j * c)) * a); elseif (a <= -6.1e-120) tmp = Float64(Float64(Float64(Float64(Float64(y * x) / c) - b) * z) * c); elseif (a <= 560000.0) tmp = fma(fma(Float64(-c), z, Float64(i * t)), b, Float64(Float64(Float64(-y) * j) * i)); else tmp = Float64(fma(Float64(-c), j, Float64(x * t)) * Float64(-a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -6.6e+34], N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[a, -6.1e-120], N[(N[(N[(N[(N[(y * x), $MachinePrecision] / c), $MachinePrecision] - b), $MachinePrecision] * z), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[a, 560000.0], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-y) * j), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision], N[(N[((-c) * j + N[(x * t), $MachinePrecision]), $MachinePrecision] * (-a)), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
\mathbf{elif}\;a \leq -6.1 \cdot 10^{-120}:\\
\;\;\;\;\left(\left(\frac{y \cdot x}{c} - b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;a \leq 560000:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot t\right), b, \left(\left(-y\right) \cdot j\right) \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-c, j, x \cdot t\right) \cdot \left(-a\right)\\
\end{array}
\end{array}
if a < -6.59999999999999976e34Initial program 67.8%
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-*.f6471.8
Applied rewrites71.8%
if -6.59999999999999976e34 < a < -6.1e-120Initial program 77.9%
Taylor expanded in a around 0
Applied rewrites88.8%
Taylor expanded in i around inf
Applied rewrites72.8%
Taylor expanded in c around inf
Applied rewrites70.0%
Taylor expanded in z around inf
Applied rewrites64.7%
if -6.1e-120 < a < 5.6e5Initial program 79.6%
Taylor expanded in a around 0
Applied rewrites75.6%
Taylor expanded in i around inf
Applied rewrites60.0%
if 5.6e5 < a Initial program 59.4%
Taylor expanded in a around 0
Applied rewrites77.5%
Taylor expanded in a around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6465.1
Applied rewrites65.1%
Final simplification64.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- j) i (* z x)) y (* (fma (- c) z (* i t)) b))))
(if (<= y -8.5e-97)
t_1
(if (<= y 6.5e+35)
(fma (fma (- x) a (* i b)) t (* (fma (- i) y (* 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 = fma(fma(-j, i, (z * x)), y, (fma(-c, z, (i * t)) * b));
double tmp;
if (y <= -8.5e-97) {
tmp = t_1;
} else if (y <= 6.5e+35) {
tmp = fma(fma(-x, a, (i * b)), t, (fma(-i, y, (c * a)) * j));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(fma(Float64(-c), z, Float64(i * t)) * b)) tmp = 0.0 if (y <= -8.5e-97) tmp = t_1; elseif (y <= 6.5e+35) tmp = fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(fma(Float64(-i), y, Float64(c * a)) * 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[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e-97], t$95$1, If[LessEqual[y, 6.5e+35], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\right)\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{-97}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.5000000000000002e-97 or 6.5000000000000003e35 < y Initial program 70.4%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites78.7%
if -8.5000000000000002e-97 < y < 6.5000000000000003e35Initial program 75.7%
Taylor expanded in z around 0
Applied rewrites69.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) t (* j c)) a)))
(if (<= a -3.8e+129)
t_1
(if (<= a 1.3e+50)
(fma (fma (- j) i (* z x)) y (* (fma (- c) z (* 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(-x, t, (j * c)) * a;
double tmp;
if (a <= -3.8e+129) {
tmp = t_1;
} else if (a <= 1.3e+50) {
tmp = fma(fma(-j, i, (z * x)), y, (fma(-c, z, (i * t)) * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), t, Float64(j * c)) * a) tmp = 0.0 if (a <= -3.8e+129) tmp = t_1; elseif (a <= 1.3e+50) tmp = fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(fma(Float64(-c), z, Float64(i * t)) * b)); 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) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -3.8e+129], t$95$1, If[LessEqual[a, 1.3e+50], N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -3.8 \cdot 10^{+129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{+50}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.80000000000000005e129 or 1.3000000000000001e50 < a Initial program 64.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-*.f6474.7
Applied rewrites74.7%
if -3.80000000000000005e129 < a < 1.3000000000000001e50Initial program 76.4%
Taylor expanded in a around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites73.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -0.075)
(* (fma (- x) t (* j c)) a)
(if (<= j 5.4e-190)
(* (fma (- c) b (* y x)) z)
(if (<= j 2.1e+70)
(* (fma (- x) a (* i b)) t)
(* (fma c a (* (- y) i)) 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 <= -0.075) {
tmp = fma(-x, t, (j * c)) * a;
} else if (j <= 5.4e-190) {
tmp = fma(-c, b, (y * x)) * z;
} else if (j <= 2.1e+70) {
tmp = fma(-x, a, (i * b)) * t;
} else {
tmp = fma(c, a, (-y * i)) * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -0.075) tmp = Float64(fma(Float64(-x), t, Float64(j * c)) * a); elseif (j <= 5.4e-190) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (j <= 2.1e+70) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); else tmp = Float64(fma(c, a, Float64(Float64(-y) * i)) * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -0.075], N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 5.4e-190], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 2.1e+70], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -0.075:\\
\;\;\;\;\mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
\mathbf{elif}\;j \leq 5.4 \cdot 10^{-190}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;j \leq 2.1 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\end{array}
\end{array}
if j < -0.0749999999999999972Initial program 78.2%
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-*.f6466.6
Applied rewrites66.6%
if -0.0749999999999999972 < j < 5.3999999999999999e-190Initial program 60.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-*.f6462.4
Applied rewrites62.4%
if 5.3999999999999999e-190 < j < 2.10000000000000008e70Initial program 77.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-*.f6455.9
Applied rewrites55.9%
if 2.10000000000000008e70 < j Initial program 82.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.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-*.f6467.5
Applied rewrites67.5%
Applied rewrites67.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma c a (* (- y) i)) j)))
(if (<= j -1.9e+144)
t_1
(if (<= j 5.4e-190)
(* (fma (- c) b (* y x)) z)
(if (<= j 2.1e+70) (* (fma (- x) a (* i b)) t) 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(c, a, (-y * i)) * j;
double tmp;
if (j <= -1.9e+144) {
tmp = t_1;
} else if (j <= 5.4e-190) {
tmp = fma(-c, b, (y * x)) * z;
} else if (j <= 2.1e+70) {
tmp = fma(-x, a, (i * b)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(c, a, Float64(Float64(-y) * i)) * j) tmp = 0.0 if (j <= -1.9e+144) tmp = t_1; elseif (j <= 5.4e-190) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); elseif (j <= 2.1e+70) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -1.9e+144], t$95$1, If[LessEqual[j, 5.4e-190], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 2.1e+70], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{if}\;j \leq -1.9 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 5.4 \cdot 10^{-190}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{elif}\;j \leq 2.1 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.90000000000000013e144 or 2.10000000000000008e70 < j Initial program 79.8%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.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-*.f6473.7
Applied rewrites73.7%
Applied rewrites73.7%
if -1.90000000000000013e144 < j < 5.3999999999999999e-190Initial 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-*.f6458.0
Applied rewrites58.0%
if 5.3999999999999999e-190 < j < 2.10000000000000008e70Initial program 77.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-*.f6455.9
Applied rewrites55.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma c a (* (- y) i)) j)))
(if (<= j -1.95e-54)
t_1
(if (<= j 1.75e-219)
(* (* y x) z)
(if (<= j 9.8e-26) (* (* x t) (- 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(c, a, (-y * i)) * j;
double tmp;
if (j <= -1.95e-54) {
tmp = t_1;
} else if (j <= 1.75e-219) {
tmp = (y * x) * z;
} else if (j <= 9.8e-26) {
tmp = (x * t) * -a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(c, a, Float64(Float64(-y) * i)) * j) tmp = 0.0 if (j <= -1.95e-54) tmp = t_1; elseif (j <= 1.75e-219) tmp = Float64(Float64(y * x) * z); elseif (j <= 9.8e-26) tmp = Float64(Float64(x * t) * Float64(-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[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -1.95e-54], t$95$1, If[LessEqual[j, 1.75e-219], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 9.8e-26], N[(N[(x * t), $MachinePrecision] * (-a)), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{if}\;j \leq -1.95 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.75 \cdot 10^{-219}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;j \leq 9.8 \cdot 10^{-26}:\\
\;\;\;\;\left(x \cdot t\right) \cdot \left(-a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.95e-54 or 9.7999999999999998e-26 < j Initial program 80.4%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.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-*.f6458.9
Applied rewrites58.9%
Applied rewrites58.9%
if -1.95e-54 < j < 1.75000000000000006e-219Initial program 58.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-*.f6464.8
Applied rewrites64.8%
Taylor expanded in c around 0
Applied rewrites44.6%
if 1.75000000000000006e-219 < j < 9.7999999999999998e-26Initial program 71.7%
Taylor expanded in a around 0
Applied rewrites80.9%
Taylor expanded in a around -inf
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6438.1
Applied rewrites38.1%
Taylor expanded in c around 0
Applied rewrites35.6%
Final simplification51.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -5.6e+54)
(* (* j c) a)
(if (<= j 7.5e-186)
(* (* y x) z)
(if (<= j 2.25e+82) (* (* b t) i) (* (* (- y) i) 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 <= -5.6e+54) {
tmp = (j * c) * a;
} else if (j <= 7.5e-186) {
tmp = (y * x) * z;
} else if (j <= 2.25e+82) {
tmp = (b * t) * i;
} else {
tmp = (-y * i) * j;
}
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 (j <= (-5.6d+54)) then
tmp = (j * c) * a
else if (j <= 7.5d-186) then
tmp = (y * x) * z
else if (j <= 2.25d+82) then
tmp = (b * t) * i
else
tmp = (-y * i) * j
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 (j <= -5.6e+54) {
tmp = (j * c) * a;
} else if (j <= 7.5e-186) {
tmp = (y * x) * z;
} else if (j <= 2.25e+82) {
tmp = (b * t) * i;
} else {
tmp = (-y * i) * j;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -5.6e+54: tmp = (j * c) * a elif j <= 7.5e-186: tmp = (y * x) * z elif j <= 2.25e+82: tmp = (b * t) * i else: tmp = (-y * i) * j return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -5.6e+54) tmp = Float64(Float64(j * c) * a); elseif (j <= 7.5e-186) tmp = Float64(Float64(y * x) * z); elseif (j <= 2.25e+82) tmp = Float64(Float64(b * t) * i); else tmp = Float64(Float64(Float64(-y) * i) * j); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (j <= -5.6e+54) tmp = (j * c) * a; elseif (j <= 7.5e-186) tmp = (y * x) * z; elseif (j <= 2.25e+82) tmp = (b * t) * i; else tmp = (-y * i) * j; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -5.6e+54], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, 7.5e-186], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 2.25e+82], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -5.6 \cdot 10^{+54}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;j \leq 7.5 \cdot 10^{-186}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;j \leq 2.25 \cdot 10^{+82}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-y\right) \cdot i\right) \cdot j\\
\end{array}
\end{array}
if j < -5.6000000000000003e54Initial program 78.5%
Taylor expanded in z around 0
Applied rewrites69.7%
Taylor expanded in c around inf
Applied rewrites58.4%
if -5.6000000000000003e54 < j < 7.50000000000000076e-186Initial program 63.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-*.f6458.6
Applied rewrites58.6%
Taylor expanded in c around 0
Applied rewrites38.4%
if 7.50000000000000076e-186 < j < 2.2499999999999998e82Initial program 77.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6447.3
Applied rewrites47.3%
Taylor expanded in b around inf
Applied rewrites36.0%
if 2.2499999999999998e82 < j Initial program 82.2%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.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-*.f6466.9
Applied rewrites66.9%
Taylor expanded in c around 0
Applied rewrites47.0%
Final simplification43.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma c a (* (- y) i)) j)))
(if (<= j -1.9e+144)
t_1
(if (<= j 1.12e+21) (* (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(c, a, (-y * i)) * j;
double tmp;
if (j <= -1.9e+144) {
tmp = t_1;
} else if (j <= 1.12e+21) {
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(c, a, Float64(Float64(-y) * i)) * j) tmp = 0.0 if (j <= -1.9e+144) tmp = t_1; elseif (j <= 1.12e+21) 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[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -1.9e+144], t$95$1, If[LessEqual[j, 1.12e+21], 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(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{if}\;j \leq -1.9 \cdot 10^{+144}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.12 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -1.90000000000000013e144 or 1.12e21 < j Initial program 80.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.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-*.f6470.8
Applied rewrites70.8%
Applied rewrites70.8%
if -1.90000000000000013e144 < j < 1.12e21Initial program 68.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-*.f6454.1
Applied rewrites54.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma c a (* (- y) i)) j)))
(if (<= j -6.3e+75)
t_1
(if (<= j 1.5e-25) (* (fma (- a) t (* 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(c, a, (-y * i)) * j;
double tmp;
if (j <= -6.3e+75) {
tmp = t_1;
} else if (j <= 1.5e-25) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(c, a, Float64(Float64(-y) * i)) * j) tmp = 0.0 if (j <= -6.3e+75) tmp = t_1; elseif (j <= 1.5e-25) tmp = Float64(fma(Float64(-a), t, 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[(c * a + N[((-y) * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -6.3e+75], t$95$1, If[LessEqual[j, 1.5e-25], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(c, a, \left(-y\right) \cdot i\right) \cdot j\\
\mathbf{if}\;j \leq -6.3 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.5 \cdot 10^{-25}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -6.30000000000000036e75 or 1.4999999999999999e-25 < j Initial program 81.6%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.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-*.f6465.8
Applied rewrites65.8%
Applied rewrites65.9%
if -6.30000000000000036e75 < j < 1.4999999999999999e-25Initial program 65.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* j c) a)))
(if (<= j -5.6e+54)
t_1
(if (<= j 7.5e-186)
(* (* y x) z)
(if (<= j 2.55e+72) (* (* b t) 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 = (j * c) * a;
double tmp;
if (j <= -5.6e+54) {
tmp = t_1;
} else if (j <= 7.5e-186) {
tmp = (y * x) * z;
} else if (j <= 2.55e+72) {
tmp = (b * t) * 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 = (j * c) * a
if (j <= (-5.6d+54)) then
tmp = t_1
else if (j <= 7.5d-186) then
tmp = (y * x) * z
else if (j <= 2.55d+72) then
tmp = (b * t) * 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 = (j * c) * a;
double tmp;
if (j <= -5.6e+54) {
tmp = t_1;
} else if (j <= 7.5e-186) {
tmp = (y * x) * z;
} else if (j <= 2.55e+72) {
tmp = (b * t) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * c) * a tmp = 0 if j <= -5.6e+54: tmp = t_1 elif j <= 7.5e-186: tmp = (y * x) * z elif j <= 2.55e+72: tmp = (b * t) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * c) * a) tmp = 0.0 if (j <= -5.6e+54) tmp = t_1; elseif (j <= 7.5e-186) tmp = Float64(Float64(y * x) * z); elseif (j <= 2.55e+72) tmp = Float64(Float64(b * t) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * c) * a; tmp = 0.0; if (j <= -5.6e+54) tmp = t_1; elseif (j <= 7.5e-186) tmp = (y * x) * z; elseif (j <= 2.55e+72) tmp = (b * t) * 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[(j * c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[j, -5.6e+54], t$95$1, If[LessEqual[j, 7.5e-186], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 2.55e+72], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot a\\
\mathbf{if}\;j \leq -5.6 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 7.5 \cdot 10^{-186}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;j \leq 2.55 \cdot 10^{+72}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -5.6000000000000003e54 or 2.54999999999999989e72 < j Initial program 80.8%
Taylor expanded in z around 0
Applied rewrites74.2%
Taylor expanded in c around inf
Applied rewrites42.5%
if -5.6000000000000003e54 < j < 7.50000000000000076e-186Initial program 63.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-*.f6458.6
Applied rewrites58.6%
Taylor expanded in c around 0
Applied rewrites38.4%
if 7.50000000000000076e-186 < j < 2.54999999999999989e72Initial program 76.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6448.2
Applied rewrites48.2%
Taylor expanded in b around inf
Applied rewrites36.6%
Final simplification39.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* j c) a)))
(if (<= j -5.6e+54)
t_1
(if (<= j 8e-186) (* (* y x) z) (if (<= j 2.8e+72) (* (* i b) t) 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 = (j * c) * a;
double tmp;
if (j <= -5.6e+54) {
tmp = t_1;
} else if (j <= 8e-186) {
tmp = (y * x) * z;
} else if (j <= 2.8e+72) {
tmp = (i * b) * t;
} 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 = (j * c) * a
if (j <= (-5.6d+54)) then
tmp = t_1
else if (j <= 8d-186) then
tmp = (y * x) * z
else if (j <= 2.8d+72) then
tmp = (i * b) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * c) * a;
double tmp;
if (j <= -5.6e+54) {
tmp = t_1;
} else if (j <= 8e-186) {
tmp = (y * x) * z;
} else if (j <= 2.8e+72) {
tmp = (i * b) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * c) * a tmp = 0 if j <= -5.6e+54: tmp = t_1 elif j <= 8e-186: tmp = (y * x) * z elif j <= 2.8e+72: tmp = (i * b) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * c) * a) tmp = 0.0 if (j <= -5.6e+54) tmp = t_1; elseif (j <= 8e-186) tmp = Float64(Float64(y * x) * z); elseif (j <= 2.8e+72) tmp = Float64(Float64(i * b) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * c) * a; tmp = 0.0; if (j <= -5.6e+54) tmp = t_1; elseif (j <= 8e-186) tmp = (y * x) * z; elseif (j <= 2.8e+72) tmp = (i * b) * t; 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[(j * c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[j, -5.6e+54], t$95$1, If[LessEqual[j, 8e-186], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[j, 2.8e+72], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot a\\
\mathbf{if}\;j \leq -5.6 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 8 \cdot 10^{-186}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;j \leq 2.8 \cdot 10^{+72}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -5.6000000000000003e54 or 2.7999999999999999e72 < j Initial program 80.8%
Taylor expanded in z around 0
Applied rewrites74.2%
Taylor expanded in c around inf
Applied rewrites42.5%
if -5.6000000000000003e54 < j < 7.9999999999999993e-186Initial program 63.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-*.f6458.6
Applied rewrites58.6%
Taylor expanded in c around 0
Applied rewrites38.4%
if 7.9999999999999993e-186 < j < 2.7999999999999999e72Initial program 76.7%
Taylor expanded in z around 0
Applied rewrites64.7%
Taylor expanded in b around inf
Applied rewrites29.2%
Applied rewrites36.6%
Final simplification39.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* j c) a)))
(if (<= j -2.05e+54)
t_1
(if (<= j 8e-186) (* (* z y) x) (if (<= j 2.8e+72) (* (* i b) t) 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 = (j * c) * a;
double tmp;
if (j <= -2.05e+54) {
tmp = t_1;
} else if (j <= 8e-186) {
tmp = (z * y) * x;
} else if (j <= 2.8e+72) {
tmp = (i * b) * t;
} 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 = (j * c) * a
if (j <= (-2.05d+54)) then
tmp = t_1
else if (j <= 8d-186) then
tmp = (z * y) * x
else if (j <= 2.8d+72) then
tmp = (i * b) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * c) * a;
double tmp;
if (j <= -2.05e+54) {
tmp = t_1;
} else if (j <= 8e-186) {
tmp = (z * y) * x;
} else if (j <= 2.8e+72) {
tmp = (i * b) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * c) * a tmp = 0 if j <= -2.05e+54: tmp = t_1 elif j <= 8e-186: tmp = (z * y) * x elif j <= 2.8e+72: tmp = (i * b) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * c) * a) tmp = 0.0 if (j <= -2.05e+54) tmp = t_1; elseif (j <= 8e-186) tmp = Float64(Float64(z * y) * x); elseif (j <= 2.8e+72) tmp = Float64(Float64(i * b) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * c) * a; tmp = 0.0; if (j <= -2.05e+54) tmp = t_1; elseif (j <= 8e-186) tmp = (z * y) * x; elseif (j <= 2.8e+72) tmp = (i * b) * t; 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[(j * c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[j, -2.05e+54], t$95$1, If[LessEqual[j, 8e-186], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 2.8e+72], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot a\\
\mathbf{if}\;j \leq -2.05 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 8 \cdot 10^{-186}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;j \leq 2.8 \cdot 10^{+72}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -2.04999999999999984e54 or 2.7999999999999999e72 < j Initial program 80.8%
Taylor expanded in z around 0
Applied rewrites74.2%
Taylor expanded in c around inf
Applied rewrites42.5%
if -2.04999999999999984e54 < j < 7.9999999999999993e-186Initial program 63.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.0
Applied rewrites51.0%
Taylor expanded in a around 0
Applied rewrites37.5%
if 7.9999999999999993e-186 < j < 2.7999999999999999e72Initial program 76.7%
Taylor expanded in z around 0
Applied rewrites64.7%
Taylor expanded in b around inf
Applied rewrites29.2%
Applied rewrites36.6%
Final simplification39.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* j c) a))) (if (<= a -7.8e+27) t_1 (if (<= a 33.0) (* (* i b) t) 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 = (j * c) * a;
double tmp;
if (a <= -7.8e+27) {
tmp = t_1;
} else if (a <= 33.0) {
tmp = (i * b) * t;
} 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 = (j * c) * a
if (a <= (-7.8d+27)) then
tmp = t_1
else if (a <= 33.0d0) then
tmp = (i * b) * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * c) * a;
double tmp;
if (a <= -7.8e+27) {
tmp = t_1;
} else if (a <= 33.0) {
tmp = (i * b) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * c) * a tmp = 0 if a <= -7.8e+27: tmp = t_1 elif a <= 33.0: tmp = (i * b) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * c) * a) tmp = 0.0 if (a <= -7.8e+27) tmp = t_1; elseif (a <= 33.0) tmp = Float64(Float64(i * b) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * c) * a; tmp = 0.0; if (a <= -7.8e+27) tmp = t_1; elseif (a <= 33.0) tmp = (i * b) * t; 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[(j * c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -7.8e+27], t$95$1, If[LessEqual[a, 33.0], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -7.8 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 33:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -7.7999999999999997e27 or 33 < a Initial program 63.0%
Taylor expanded in z around 0
Applied rewrites64.9%
Taylor expanded in c around inf
Applied rewrites42.7%
if -7.7999999999999997e27 < a < 33Initial program 79.7%
Taylor expanded in z around 0
Applied rewrites56.1%
Taylor expanded in b around inf
Applied rewrites26.1%
Applied rewrites30.5%
Final simplification35.6%
(FPCore (x y z t a b c i j) :precision binary64 (* (* i b) t))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (i * b) * t;
}
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 = (i * b) * t
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 (i * b) * t;
}
def code(x, y, z, t, a, b, c, i, j): return (i * b) * t
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(i * b) * t) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (i * b) * t; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision]
\begin{array}{l}
\\
\left(i \cdot b\right) \cdot t
\end{array}
Initial program 72.8%
Taylor expanded in z around 0
Applied rewrites59.8%
Taylor expanded in b around inf
Applied rewrites21.6%
Applied rewrites23.5%
Final simplification23.5%
(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 2024276
(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)))))