
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); 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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\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) (* i a)))) (* j (- (* c t) (* i y)))))
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) - (i * a)))) + (j * ((c * t) - (i * y)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
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(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); 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[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(if (<=
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(* j (- (* c t) (* i y))))
INFINITY)
(fma
(fma (- y) i (* c t))
j
(fma (- b) (fma (- a) i (* c z)) (* (fma (- a) t (* z y)) x)))
(fma (fma (- x) t (* i b)) a (* (fma (- i) j (* z x)) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))) <= ((double) INFINITY)) {
tmp = fma(fma(-y, i, (c * t)), j, fma(-b, fma(-a, i, (c * z)), (fma(-a, t, (z * y)) * x)));
} else {
tmp = fma(fma(-x, t, (i * b)), a, (fma(-i, j, (z * x)) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) <= Inf) tmp = fma(fma(Float64(-y), i, Float64(c * t)), j, fma(Float64(-b), fma(Float64(-a), i, Float64(c * z)), Float64(fma(Float64(-a), t, Float64(z * y)) * x))); else tmp = fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[((-y) * i + N[(c * t), $MachinePrecision]), $MachinePrecision] * j + N[((-b) * N[((-a) * i + N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot t\right), j, \mathsf{fma}\left(-b, \mathsf{fma}\left(-a, i, c \cdot z\right), \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 89.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6489.9
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6489.9
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites89.9%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in y around 0
Applied rewrites44.3%
Taylor expanded in c around 0
Applied rewrites63.3%
Final simplification84.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- y) j (* b a))))
(if (<= i -8.2e+76)
(fma t_1 i (* (* (- a) t) x))
(if (<= i 9e+135)
(fma
(fma (- z) c (* i a))
b
(fma (fma (- x) a (* j c)) t (* (fma (- i) j (* z x)) y)))
(* t_1 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(-y, j, (b * a));
double tmp;
if (i <= -8.2e+76) {
tmp = fma(t_1, i, ((-a * t) * x));
} else if (i <= 9e+135) {
tmp = fma(fma(-z, c, (i * a)), b, fma(fma(-x, a, (j * c)), t, (fma(-i, j, (z * x)) * y)));
} else {
tmp = t_1 * i;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-y), j, Float64(b * a)) tmp = 0.0 if (i <= -8.2e+76) tmp = fma(t_1, i, Float64(Float64(Float64(-a) * t) * x)); elseif (i <= 9e+135) tmp = fma(fma(Float64(-z), c, Float64(i * a)), b, fma(fma(Float64(-x), a, Float64(j * c)), t, Float64(fma(Float64(-i), j, Float64(z * x)) * y))); else tmp = Float64(t_1 * i); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -8.2e+76], N[(t$95$1 * i + N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 9e+135], N[(N[((-z) * c + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, j, b \cdot a\right)\\
\mathbf{if}\;i \leq -8.2 \cdot 10^{+76}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, i, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\
\mathbf{elif}\;i \leq 9 \cdot 10^{+135}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, c, i \cdot a\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-x, a, j \cdot c\right), t, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot i\\
\end{array}
\end{array}
if i < -8.1999999999999997e76Initial program 57.1%
Taylor expanded in c around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
associate-*r*N/A
cancel-sign-subN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-out--N/A
+-commutativeN/A
Applied rewrites73.6%
Taylor expanded in y around 0
Applied rewrites79.3%
if -8.1999999999999997e76 < i < 9.00000000000000014e135Initial program 76.2%
Taylor expanded in y around 0
Applied rewrites82.1%
if 9.00000000000000014e135 < i Initial program 55.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
*-commutativeN/A
lower-*.f6483.8
Applied rewrites83.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) c (* y x)) z)))
(if (<= z -6.5e+208)
t_1
(if (<= z -1.08e-72)
(fma (fma (- y) j (* b a)) i (* (fma (- t) a (* z y)) x))
(if (<= z 1.45e-148)
(fma (* i a) b (* (fma (- x) a (* j c)) t))
(if (<= z 1.9e+133)
(fma (fma (- x) t (* i b)) a (* (fma (- i) j (* z x)) y))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, c, (y * x)) * z;
double tmp;
if (z <= -6.5e+208) {
tmp = t_1;
} else if (z <= -1.08e-72) {
tmp = fma(fma(-y, j, (b * a)), i, (fma(-t, a, (z * y)) * x));
} else if (z <= 1.45e-148) {
tmp = fma((i * a), b, (fma(-x, a, (j * c)) * t));
} else if (z <= 1.9e+133) {
tmp = fma(fma(-x, t, (i * b)), a, (fma(-i, j, (z * x)) * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), c, Float64(y * x)) * z) tmp = 0.0 if (z <= -6.5e+208) tmp = t_1; elseif (z <= -1.08e-72) tmp = fma(fma(Float64(-y), j, Float64(b * a)), i, Float64(fma(Float64(-t), a, Float64(z * y)) * x)); elseif (z <= 1.45e-148) tmp = fma(Float64(i * a), b, Float64(fma(Float64(-x), a, Float64(j * c)) * t)); elseif (z <= 1.9e+133) tmp = fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); 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) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -6.5e+208], t$95$1, If[LessEqual[z, -1.08e-72], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e-148], N[(N[(i * a), $MachinePrecision] * b + N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+133], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+208}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.08 \cdot 10^{-72}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, j, b \cdot a\right), i, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-148}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot a, b, \mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\right)\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+133}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.5000000000000001e208 or 1.9000000000000001e133 < z Initial program 52.5%
Taylor expanded in z 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-*.f6475.4
Applied rewrites75.4%
if -6.5000000000000001e208 < z < -1.07999999999999998e-72Initial program 78.0%
Taylor expanded in c around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
associate-*r*N/A
cancel-sign-subN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
distribute-rgt-out--N/A
+-commutativeN/A
Applied rewrites72.5%
if -1.07999999999999998e-72 < z < 1.4499999999999999e-148Initial program 76.1%
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
Applied rewrites83.5%
Taylor expanded in z around 0
Applied rewrites82.1%
if 1.4499999999999999e-148 < z < 1.9000000000000001e133Initial program 70.8%
Taylor expanded in y around 0
Applied rewrites82.7%
Taylor expanded in c around 0
Applied rewrites74.1%
Final simplification76.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) c (* y x)) z)))
(if (<= z -9e+151)
t_1
(if (<= z 1.45e-148)
(fma (* i a) b (* (fma (- x) a (* j c)) t))
(if (<= z 1.9e+133)
(fma (fma (- x) t (* i b)) a (* (fma (- i) j (* z x)) y))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, c, (y * x)) * z;
double tmp;
if (z <= -9e+151) {
tmp = t_1;
} else if (z <= 1.45e-148) {
tmp = fma((i * a), b, (fma(-x, a, (j * c)) * t));
} else if (z <= 1.9e+133) {
tmp = fma(fma(-x, t, (i * b)), a, (fma(-i, j, (z * x)) * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), c, Float64(y * x)) * z) tmp = 0.0 if (z <= -9e+151) tmp = t_1; elseif (z <= 1.45e-148) tmp = fma(Float64(i * a), b, Float64(fma(Float64(-x), a, Float64(j * c)) * t)); elseif (z <= 1.9e+133) tmp = fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); 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) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -9e+151], t$95$1, If[LessEqual[z, 1.45e-148], N[(N[(i * a), $MachinePrecision] * b + N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.9e+133], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -9 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-148}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot a, b, \mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\right)\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+133}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.9999999999999997e151 or 1.9000000000000001e133 < z Initial program 59.6%
Taylor expanded in z 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-*.f6475.7
Applied rewrites75.7%
if -8.9999999999999997e151 < z < 1.4499999999999999e-148Initial program 75.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
Applied rewrites77.2%
Taylor expanded in z around 0
Applied rewrites73.0%
if 1.4499999999999999e-148 < z < 1.9000000000000001e133Initial program 70.8%
Taylor expanded in y around 0
Applied rewrites82.7%
Taylor expanded in c around 0
Applied rewrites74.1%
Final simplification74.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= y -3e-57) (not (<= y 1.42e-5))) (fma (fma (- x) t (* i b)) a (* (fma (- i) j (* z x)) y)) (fma (fma (- z) c (* i a)) b (* (fma (- x) a (* j c)) t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((y <= -3e-57) || !(y <= 1.42e-5)) {
tmp = fma(fma(-x, t, (i * b)), a, (fma(-i, j, (z * x)) * y));
} else {
tmp = fma(fma(-z, c, (i * a)), b, (fma(-x, a, (j * c)) * t));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((y <= -3e-57) || !(y <= 1.42e-5)) tmp = fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); else tmp = fma(fma(Float64(-z), c, Float64(i * a)), b, Float64(fma(Float64(-x), a, Float64(j * c)) * t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[y, -3e-57], N[Not[LessEqual[y, 1.42e-5]], $MachinePrecision]], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * c + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-57} \lor \neg \left(y \leq 1.42 \cdot 10^{-5}\right):\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, c, i \cdot a\right), b, \mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\right)\\
\end{array}
\end{array}
if y < -3.00000000000000001e-57 or 1.42e-5 < y Initial program 61.8%
Taylor expanded in y around 0
Applied rewrites74.2%
Taylor expanded in c around 0
Applied rewrites75.1%
if -3.00000000000000001e-57 < y < 1.42e-5Initial program 78.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
Applied rewrites74.9%
Final simplification75.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) c (* y x)) z)))
(if (<= z -9e+151)
t_1
(if (<= z 1.6e-148)
(fma (* i a) b (* (fma (- x) a (* j c)) t))
(if (<= z 2.25e+30)
(fma (* (- t) x) a (* (fma (- i) j (* z x)) y))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, c, (y * x)) * z;
double tmp;
if (z <= -9e+151) {
tmp = t_1;
} else if (z <= 1.6e-148) {
tmp = fma((i * a), b, (fma(-x, a, (j * c)) * t));
} else if (z <= 2.25e+30) {
tmp = fma((-t * x), a, (fma(-i, j, (z * x)) * y));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), c, Float64(y * x)) * z) tmp = 0.0 if (z <= -9e+151) tmp = t_1; elseif (z <= 1.6e-148) tmp = fma(Float64(i * a), b, Float64(fma(Float64(-x), a, Float64(j * c)) * t)); elseif (z <= 2.25e+30) tmp = fma(Float64(Float64(-t) * x), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y)); 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) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -9e+151], t$95$1, If[LessEqual[z, 1.6e-148], N[(N[(i * a), $MachinePrecision] * b + N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e+30], N[(N[((-t) * x), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -9 \cdot 10^{+151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-148}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot a, b, \mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\right)\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{+30}:\\
\;\;\;\;\mathsf{fma}\left(\left(-t\right) \cdot x, a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.9999999999999997e151 or 2.24999999999999997e30 < z Initial program 58.5%
Taylor expanded in z 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-*.f6471.4
Applied rewrites71.4%
if -8.9999999999999997e151 < z < 1.59999999999999997e-148Initial program 75.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
Applied rewrites77.2%
Taylor expanded in z around 0
Applied rewrites73.0%
if 1.59999999999999997e-148 < z < 2.24999999999999997e30Initial program 77.9%
Taylor expanded in y around 0
Applied rewrites82.8%
Taylor expanded in c around 0
Applied rewrites82.6%
Taylor expanded in x around inf
Applied rewrites64.2%
Final simplification71.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- y) j (* b a)) i)))
(if (<= i -2.35e+58)
t_1
(if (<= i -9.5e-99)
(* (fma (- t) a (* z y)) x)
(if (<= i 1.6e+34)
(* (fma (- b) c (* y x)) z)
(if (<= i 9e+135) (* (fma (- x) t (* i b)) 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 * a)) * i;
double tmp;
if (i <= -2.35e+58) {
tmp = t_1;
} else if (i <= -9.5e-99) {
tmp = fma(-t, a, (z * y)) * x;
} else if (i <= 1.6e+34) {
tmp = fma(-b, c, (y * x)) * z;
} else if (i <= 9e+135) {
tmp = fma(-x, t, (i * b)) * 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 * a)) * i) tmp = 0.0 if (i <= -2.35e+58) tmp = t_1; elseif (i <= -9.5e-99) tmp = Float64(fma(Float64(-t), a, Float64(z * y)) * x); elseif (i <= 1.6e+34) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); elseif (i <= 9e+135) tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * 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 * a), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -2.35e+58], t$95$1, If[LessEqual[i, -9.5e-99], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[i, 1.6e+34], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[i, 9e+135], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\
\mathbf{if}\;i \leq -2.35 \cdot 10^{+58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq -9.5 \cdot 10^{-99}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
\mathbf{elif}\;i \leq 1.6 \cdot 10^{+34}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{elif}\;i \leq 9 \cdot 10^{+135}:\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -2.34999999999999986e58 or 9.00000000000000014e135 < i Initial program 58.4%
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
*-commutativeN/A
lower-*.f6477.4
Applied rewrites77.4%
if -2.34999999999999986e58 < i < -9.5000000000000008e-99Initial program 76.0%
Taylor expanded in y around 0
Applied rewrites81.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/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-*.f6453.5
Applied rewrites53.5%
if -9.5000000000000008e-99 < i < 1.5999999999999999e34Initial program 76.5%
Taylor expanded in z 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-*.f6456.1
Applied rewrites56.1%
if 1.5999999999999999e34 < i < 9.00000000000000014e135Initial program 69.9%
Taylor expanded in a 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-*.f6459.2
Applied rewrites59.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= z -9e+151) (not (<= z 5.8e+31))) (* (fma (- b) c (* y x)) z) (fma (* i a) b (* (fma (- x) a (* j c)) t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((z <= -9e+151) || !(z <= 5.8e+31)) {
tmp = fma(-b, c, (y * x)) * z;
} else {
tmp = fma((i * a), b, (fma(-x, a, (j * c)) * t));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((z <= -9e+151) || !(z <= 5.8e+31)) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); else tmp = fma(Float64(i * a), b, Float64(fma(Float64(-x), a, Float64(j * c)) * t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -9e+151], N[Not[LessEqual[z, 5.8e+31]], $MachinePrecision]], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(i * a), $MachinePrecision] * b + N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+151} \lor \neg \left(z \leq 5.8 \cdot 10^{+31}\right):\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i \cdot a, b, \mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\right)\\
\end{array}
\end{array}
if z < -8.9999999999999997e151 or 5.8000000000000001e31 < z Initial program 58.5%
Taylor expanded in z 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-*.f6471.4
Applied rewrites71.4%
if -8.9999999999999997e151 < z < 5.8000000000000001e31Initial program 76.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
Applied rewrites71.1%
Taylor expanded in z around 0
Applied rewrites67.4%
Final simplification68.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) c (* y x)) z)))
(if (<= z -7000000.0)
t_1
(if (<= z 1.25e-148)
(* (fma (- x) a (* j c)) t)
(if (<= z 8e+176) (* (fma (- i) j (* z x)) y) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, c, (y * x)) * z;
double tmp;
if (z <= -7000000.0) {
tmp = t_1;
} else if (z <= 1.25e-148) {
tmp = fma(-x, a, (j * c)) * t;
} else if (z <= 8e+176) {
tmp = fma(-i, j, (z * x)) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), c, Float64(y * x)) * z) tmp = 0.0 if (z <= -7000000.0) tmp = t_1; elseif (z <= 1.25e-148) tmp = Float64(fma(Float64(-x), a, Float64(j * c)) * t); elseif (z <= 8e+176) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); 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) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -7000000.0], t$95$1, If[LessEqual[z, 1.25e-148], N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 8e+176], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -7000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-148}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+176}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7e6 or 8.0000000000000001e176 < z Initial program 64.3%
Taylor expanded in z 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-*.f6461.9
Applied rewrites61.9%
if -7e6 < z < 1.25e-148Initial program 76.5%
Taylor expanded in t 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-*.f6457.3
Applied rewrites57.3%
if 1.25e-148 < z < 8.0000000000000001e176Initial program 70.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6448.6
Applied rewrites48.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= i -8e+78)
(* (* i b) a)
(if (<= i 13500000.0)
(* (fma (- b) c (* y x)) z)
(if (<= i 2.1e+173) (* (fma (- i) y (* c t)) j) (* (* b a) 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 <= -8e+78) {
tmp = (i * b) * a;
} else if (i <= 13500000.0) {
tmp = fma(-b, c, (y * x)) * z;
} else if (i <= 2.1e+173) {
tmp = fma(-i, y, (c * t)) * j;
} else {
tmp = (b * a) * i;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -8e+78) tmp = Float64(Float64(i * b) * a); elseif (i <= 13500000.0) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); elseif (i <= 2.1e+173) tmp = Float64(fma(Float64(-i), y, Float64(c * t)) * j); else tmp = Float64(Float64(b * a) * i); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -8e+78], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[i, 13500000.0], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[i, 2.1e+173], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -8 \cdot 10^{+78}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;i \leq 13500000:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{elif}\;i \leq 2.1 \cdot 10^{+173}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\end{array}
\end{array}
if i < -8.00000000000000007e78Initial program 57.3%
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
*-commutativeN/A
lower-*.f6478.9
Applied rewrites78.9%
Taylor expanded in y around 0
Applied rewrites54.1%
if -8.00000000000000007e78 < i < 1.35e7Initial program 75.8%
Taylor expanded in z 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-*.f6452.1
Applied rewrites52.1%
if 1.35e7 < i < 2.1e173Initial program 77.1%
Taylor expanded in y around 0
Applied rewrites80.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6455.5
Applied rewrites55.5%
if 2.1e173 < i Initial program 44.9%
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
*-commutativeN/A
lower-*.f6476.4
Applied rewrites76.4%
Taylor expanded in y around 0
Applied rewrites56.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= z -3.05e+156) (not (<= z 7.5e+30))) (* (fma (- b) c (* y x)) z) (* (fma (- x) t (* i b)) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((z <= -3.05e+156) || !(z <= 7.5e+30)) {
tmp = fma(-b, c, (y * x)) * z;
} else {
tmp = fma(-x, t, (i * b)) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((z <= -3.05e+156) || !(z <= 7.5e+30)) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); else tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -3.05e+156], N[Not[LessEqual[z, 7.5e+30]], $MachinePrecision]], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.05 \cdot 10^{+156} \lor \neg \left(z \leq 7.5 \cdot 10^{+30}\right):\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\end{array}
\end{array}
if z < -3.0500000000000001e156 or 7.49999999999999973e30 < z Initial program 59.2%
Taylor expanded in z 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-*.f6471.1
Applied rewrites71.1%
if -3.0500000000000001e156 < z < 7.49999999999999973e30Initial program 75.5%
Taylor expanded in a 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-*.f6452.4
Applied rewrites52.4%
Final simplification58.9%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= x -3.5e+37) (not (<= x 6.8e-10))) (* (fma (- t) a (* z y)) x) (* (fma (- i) y (* c t)) j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((x <= -3.5e+37) || !(x <= 6.8e-10)) {
tmp = fma(-t, a, (z * y)) * x;
} else {
tmp = fma(-i, y, (c * t)) * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((x <= -3.5e+37) || !(x <= 6.8e-10)) tmp = Float64(fma(Float64(-t), a, Float64(z * y)) * x); else tmp = Float64(fma(Float64(-i), y, Float64(c * t)) * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[x, -3.5e+37], N[Not[LessEqual[x, 6.8e-10]], $MachinePrecision]], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{+37} \lor \neg \left(x \leq 6.8 \cdot 10^{-10}\right):\\
\;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\
\end{array}
\end{array}
if x < -3.5e37 or 6.8000000000000003e-10 < x Initial program 70.6%
Taylor expanded in y around 0
Applied rewrites68.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/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-*.f6464.2
Applied rewrites64.2%
if -3.5e37 < x < 6.8000000000000003e-10Initial program 69.1%
Taylor expanded in y around 0
Applied rewrites81.3%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6439.7
Applied rewrites39.7%
Final simplification51.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= i -8e+78) (not (<= i 8.2e+36))) (* (* i b) a) (* (fma (- b) c (* y x)) z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((i <= -8e+78) || !(i <= 8.2e+36)) {
tmp = (i * b) * a;
} else {
tmp = fma(-b, c, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((i <= -8e+78) || !(i <= 8.2e+36)) tmp = Float64(Float64(i * b) * a); else tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[i, -8e+78], N[Not[LessEqual[i, 8.2e+36]], $MachinePrecision]], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -8 \cdot 10^{+78} \lor \neg \left(i \leq 8.2 \cdot 10^{+36}\right):\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if i < -8.00000000000000007e78 or 8.20000000000000026e36 < i Initial program 59.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
*-commutativeN/A
lower-*.f6472.3
Applied rewrites72.3%
Taylor expanded in y around 0
Applied rewrites50.4%
if -8.00000000000000007e78 < i < 8.20000000000000026e36Initial program 76.7%
Taylor expanded in z 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-*.f6452.0
Applied rewrites52.0%
Final simplification51.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -8e+27)
(* (* b a) i)
(if (<= b -4.2e-202)
(* (* c j) t)
(if (<= b 5e+63) (* (* z x) y) (* (* i b) 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 <= -8e+27) {
tmp = (b * a) * i;
} else if (b <= -4.2e-202) {
tmp = (c * j) * t;
} else if (b <= 5e+63) {
tmp = (z * x) * y;
} else {
tmp = (i * b) * 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 (b <= (-8d+27)) then
tmp = (b * a) * i
else if (b <= (-4.2d-202)) then
tmp = (c * j) * t
else if (b <= 5d+63) then
tmp = (z * x) * y
else
tmp = (i * b) * 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 (b <= -8e+27) {
tmp = (b * a) * i;
} else if (b <= -4.2e-202) {
tmp = (c * j) * t;
} else if (b <= 5e+63) {
tmp = (z * x) * y;
} else {
tmp = (i * b) * a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -8e+27: tmp = (b * a) * i elif b <= -4.2e-202: tmp = (c * j) * t elif b <= 5e+63: tmp = (z * x) * y else: tmp = (i * b) * a return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -8e+27) tmp = Float64(Float64(b * a) * i); elseif (b <= -4.2e-202) tmp = Float64(Float64(c * j) * t); elseif (b <= 5e+63) tmp = Float64(Float64(z * x) * y); else tmp = Float64(Float64(i * b) * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -8e+27) tmp = (b * a) * i; elseif (b <= -4.2e-202) tmp = (c * j) * t; elseif (b <= 5e+63) tmp = (z * x) * y; else tmp = (i * b) * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -8e+27], N[(N[(b * a), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[b, -4.2e-202], N[(N[(c * j), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, 5e+63], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+27}:\\
\;\;\;\;\left(b \cdot a\right) \cdot i\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-202}:\\
\;\;\;\;\left(c \cdot j\right) \cdot t\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+63}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\end{array}
\end{array}
if b < -8.0000000000000001e27Initial program 73.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
*-commutativeN/A
lower-*.f6450.4
Applied rewrites50.4%
Taylor expanded in y around 0
Applied rewrites50.3%
if -8.0000000000000001e27 < b < -4.1999999999999997e-202Initial program 61.7%
Taylor expanded in t 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-*.f6452.3
Applied rewrites52.3%
Taylor expanded in x around 0
Applied rewrites34.4%
if -4.1999999999999997e-202 < b < 5.00000000000000011e63Initial program 69.1%
Taylor expanded in z 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-*.f6438.9
Applied rewrites38.9%
Taylor expanded in x around inf
Applied rewrites32.5%
Applied rewrites36.0%
if 5.00000000000000011e63 < b Initial program 73.5%
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
*-commutativeN/A
lower-*.f6462.3
Applied rewrites62.3%
Taylor expanded in y around 0
Applied rewrites54.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= i -1.7e+69) (not (<= i 1.45e+21))) (* (* i b) a) (* (* y x) z)))
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.7e+69) || !(i <= 1.45e+21)) {
tmp = (i * b) * a;
} else {
tmp = (y * x) * z;
}
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.7d+69)) .or. (.not. (i <= 1.45d+21))) then
tmp = (i * b) * a
else
tmp = (y * x) * z
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.7e+69) || !(i <= 1.45e+21)) {
tmp = (i * b) * a;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (i <= -1.7e+69) or not (i <= 1.45e+21): tmp = (i * b) * a else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((i <= -1.7e+69) || !(i <= 1.45e+21)) tmp = Float64(Float64(i * b) * a); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((i <= -1.7e+69) || ~((i <= 1.45e+21))) tmp = (i * b) * a; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[i, -1.7e+69], N[Not[LessEqual[i, 1.45e+21]], $MachinePrecision]], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.7 \cdot 10^{+69} \lor \neg \left(i \leq 1.45 \cdot 10^{+21}\right):\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if i < -1.69999999999999993e69 or 1.45e21 < i Initial program 61.3%
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
*-commutativeN/A
lower-*.f6470.8
Applied rewrites70.8%
Taylor expanded in y around 0
Applied rewrites49.5%
if -1.69999999999999993e69 < i < 1.45e21Initial program 76.1%
Taylor expanded in z 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-*.f6452.0
Applied rewrites52.0%
Taylor expanded in x around inf
Applied rewrites34.9%
Final simplification41.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -50000.0) (not (<= b 5e+63))) (* (* i b) a) (* (* z x) y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -50000.0) || !(b <= 5e+63)) {
tmp = (i * b) * a;
} else {
tmp = (z * x) * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((b <= (-50000.0d0)) .or. (.not. (b <= 5d+63))) then
tmp = (i * b) * a
else
tmp = (z * x) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -50000.0) || !(b <= 5e+63)) {
tmp = (i * b) * a;
} else {
tmp = (z * x) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (b <= -50000.0) or not (b <= 5e+63): tmp = (i * b) * a else: tmp = (z * x) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -50000.0) || !(b <= 5e+63)) tmp = Float64(Float64(i * b) * a); else tmp = Float64(Float64(z * x) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((b <= -50000.0) || ~((b <= 5e+63))) tmp = (i * b) * a; else tmp = (z * x) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -50000.0], N[Not[LessEqual[b, 5e+63]], $MachinePrecision]], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -50000 \lor \neg \left(b \leq 5 \cdot 10^{+63}\right):\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if b < -5e4 or 5.00000000000000011e63 < b Initial program 73.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
*-commutativeN/A
lower-*.f6454.1
Applied rewrites54.1%
Taylor expanded in y around 0
Applied rewrites48.4%
if -5e4 < b < 5.00000000000000011e63Initial program 66.7%
Taylor expanded in z 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-*.f6437.5
Applied rewrites37.5%
Taylor expanded in x around inf
Applied rewrites28.6%
Applied rewrites31.9%
Final simplification39.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= t 5e-26) (* (* z y) x) (* (* z x) y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= 5e-26) {
tmp = (z * y) * x;
} else {
tmp = (z * x) * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (t <= 5d-26) then
tmp = (z * y) * x
else
tmp = (z * x) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= 5e-26) {
tmp = (z * y) * x;
} else {
tmp = (z * x) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if t <= 5e-26: tmp = (z * y) * x else: tmp = (z * x) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= 5e-26) tmp = Float64(Float64(z * y) * x); else tmp = Float64(Float64(z * x) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (t <= 5e-26) tmp = (z * y) * x; else tmp = (z * x) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, 5e-26], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-26}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if t < 5.00000000000000019e-26Initial program 73.9%
Taylor expanded in z 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-*.f6441.3
Applied rewrites41.3%
Taylor expanded in x around inf
Applied rewrites26.2%
if 5.00000000000000019e-26 < t Initial program 57.0%
Taylor expanded in z 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-*.f6430.2
Applied rewrites30.2%
Taylor expanded in x around inf
Applied rewrites18.5%
Applied rewrites25.6%
(FPCore (x y z t a b c i j) :precision binary64 (* (* z x) y))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * x) * y;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (z * x) * y
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * x) * y;
}
def code(x, y, z, t, a, b, c, i, j): return (z * x) * y
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(z * x) * y) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (z * x) * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot x\right) \cdot y
\end{array}
Initial program 69.9%
Taylor expanded in z 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-*.f6438.6
Applied rewrites38.6%
Taylor expanded in x around inf
Applied rewrites24.3%
Applied rewrites24.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(/
(* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
(+ (* c t) (* i y)))))
(t_2
(-
(* x (- (* z y) (* a t)))
(- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
(if (< t -8.120978919195912e-33)
t_2
(if (< t -4.712553818218485e-169)
t_1
(if (< t -7.633533346031584e-308)
t_2
(if (< t 1.0535888557455487e-139) 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
if (t < (-8.120978919195912d-33)) then
tmp = t_2
else if (t < (-4.712553818218485d-169)) then
tmp = t_1
else if (t < (-7.633533346031584d-308)) then
tmp = t_2
else if (t < 1.0535888557455487d-139) then
tmp = 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y))) t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)) tmp = 0 if t < -8.120978919195912e-33: tmp = t_2 elif t < -4.712553818218485e-169: tmp = t_1 elif t < -7.633533346031584e-308: tmp = t_2 elif t < 1.0535888557455487e-139: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y)))) t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j))) tmp = 0.0 if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) tmp = 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 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y))); t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)); tmp = 0.0; if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) tmp = 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[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024318
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))