
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY)
t_1
(* (fma (- a) t (fma (fma (- b) z (* j a)) (/ c x) (* z y))) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(-a, t, fma(fma(-b, z, (j * a)), (c / x), (z * y))) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(fma(Float64(-a), t, fma(fma(Float64(-b), z, Float64(j * a)), Float64(c / x), Float64(z * y))) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-a) * t + N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * N[(c / x), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, \mathsf{fma}\left(\mathsf{fma}\left(-b, z, j \cdot a\right), \frac{c}{x}, z \cdot y\right)\right) \cdot x\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.2%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites58.7%
Taylor expanded in x around inf
Applied rewrites66.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -1.08e+256)
(+ (* (* i t) b) (* j (- (* c a) (* y i))))
(if (<= j -1.95e+21)
(* (fma (- a) t (fma (fma (- y) i (* c a)) (/ j x) (* z y))) x)
(if (<= j 0.19)
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* (* j c) a))
(fma (fma (- t) a (* z y)) x (* (fma (- i) y (* c a)) j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -1.08e+256) {
tmp = ((i * t) * b) + (j * ((c * a) - (y * i)));
} else if (j <= -1.95e+21) {
tmp = fma(-a, t, fma(fma(-y, i, (c * a)), (j / x), (z * y))) * x;
} else if (j <= 0.19) {
tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + ((j * c) * a);
} else {
tmp = fma(fma(-t, a, (z * y)), x, (fma(-i, y, (c * a)) * j));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -1.08e+256) tmp = Float64(Float64(Float64(i * t) * b) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); elseif (j <= -1.95e+21) tmp = Float64(fma(Float64(-a), t, fma(fma(Float64(-y), i, Float64(c * a)), Float64(j / x), Float64(z * y))) * x); elseif (j <= 0.19) tmp = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(Float64(j * c) * a)); else tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, Float64(fma(Float64(-i), y, Float64(c * a)) * j)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -1.08e+256], N[(N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -1.95e+21], N[(N[((-a) * t + N[(N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision] * N[(j / x), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 0.19], 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[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.08 \cdot 10^{+256}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{elif}\;j \leq -1.95 \cdot 10^{+21}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, \mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot a\right), \frac{j}{x}, z \cdot y\right)\right) \cdot x\\
\mathbf{elif}\;j \leq 0.19:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + \left(j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
\end{array}
\end{array}
if j < -1.08e256Initial program 82.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
lower-*.f6490.5
Applied rewrites90.5%
if -1.08e256 < j < -1.95e21Initial program 79.3%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
+-commutativeN/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-*.f64N/A
*-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.9
Applied rewrites73.9%
Taylor expanded in y around inf
Applied rewrites56.2%
Taylor expanded in x around inf
Applied rewrites83.5%
if -1.95e21 < j < 0.19Initial program 75.4%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6476.5
Applied rewrites76.5%
if 0.19 < j Initial program 76.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
+-commutativeN/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-*.f64N/A
*-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-*.f6478.3
Applied rewrites78.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -2e+146)
(fma (fma (- z) b (* j a)) c (* (fma (- t) a (* z y)) x))
(if (<= x 1.12e+61)
(fma
(fma (- z) c (* i t))
b
(fma (fma (- x) t (* j c)) a (* (fma (- i) j (* z x)) y)))
(* (fma (- a) t (fma (fma (- b) z (* j a)) (/ c x) (* 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 <= -2e+146) {
tmp = fma(fma(-z, b, (j * a)), c, (fma(-t, a, (z * y)) * x));
} else if (x <= 1.12e+61) {
tmp = fma(fma(-z, c, (i * t)), b, fma(fma(-x, t, (j * c)), a, (fma(-i, j, (z * x)) * y)));
} else {
tmp = fma(-a, t, fma(fma(-b, z, (j * a)), (c / x), (z * y))) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2e+146) tmp = fma(fma(Float64(-z), b, Float64(j * a)), c, Float64(fma(Float64(-t), a, Float64(z * y)) * x)); elseif (x <= 1.12e+61) tmp = fma(fma(Float64(-z), c, Float64(i * t)), b, fma(fma(Float64(-x), t, Float64(j * c)), a, Float64(fma(Float64(-i), j, Float64(z * x)) * y))); else tmp = Float64(fma(Float64(-a), t, fma(fma(Float64(-b), z, Float64(j * a)), Float64(c / x), Float64(z * y))) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+146], N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.12e+61], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-a) * t + N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * N[(c / x), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+146}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, b, j \cdot a\right), c, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{+61}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, c, i \cdot t\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-x, t, j \cdot c\right), a, \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, \mathsf{fma}\left(\mathsf{fma}\left(-b, z, j \cdot a\right), \frac{c}{x}, z \cdot y\right)\right) \cdot x\\
\end{array}
\end{array}
if x < -1.99999999999999987e146Initial program 77.7%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites87.9%
if -1.99999999999999987e146 < x < 1.12e61Initial program 79.4%
Taylor expanded in y around 0
Applied rewrites85.5%
if 1.12e61 < x Initial program 68.3%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.5%
Taylor expanded in x around inf
Applied rewrites81.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- t) a (* z y))) (t_2 (* (fma t i (* (- c) z)) b)))
(if (<= b -1.32e+122)
t_2
(if (<= b 7e-169)
(fma t_1 x (* (fma (- i) y (* c a)) j))
(if (<= b 4e+113) (fma (fma (- z) b (* j a)) c (* t_1 x)) t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (z * y));
double t_2 = fma(t, i, (-c * z)) * b;
double tmp;
if (b <= -1.32e+122) {
tmp = t_2;
} else if (b <= 7e-169) {
tmp = fma(t_1, x, (fma(-i, y, (c * a)) * j));
} else if (b <= 4e+113) {
tmp = fma(fma(-z, b, (j * a)), c, (t_1 * x));
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-t), a, Float64(z * y)) t_2 = Float64(fma(t, i, Float64(Float64(-c) * z)) * b) tmp = 0.0 if (b <= -1.32e+122) tmp = t_2; elseif (b <= 7e-169) tmp = fma(t_1, x, Float64(fma(Float64(-i), y, Float64(c * a)) * j)); elseif (b <= 4e+113) tmp = fma(fma(Float64(-z), b, Float64(j * a)), c, Float64(t_1 * x)); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * i + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.32e+122], t$95$2, If[LessEqual[b, 7e-169], N[(t$95$1 * x + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e+113], N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c + N[(t$95$1 * x), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right)\\
t_2 := \mathsf{fma}\left(t, i, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -1.32 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 7 \cdot 10^{-169}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+113}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, b, j \cdot a\right), c, t\_1 \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -1.31999999999999992e122 or 4e113 < b Initial program 79.6%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6475.7
Applied rewrites75.7%
Applied rewrites75.7%
if -1.31999999999999992e122 < b < 7.0000000000000006e-169Initial program 76.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
+-commutativeN/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-*.f64N/A
*-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-*.f6478.6
Applied rewrites78.6%
if 7.0000000000000006e-169 < b < 4e113Initial program 73.8%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites72.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (+ (* (* (- z) b) c) (* j (- (* c a) (* y i))))))
(if (<= c -4e-32)
t_1
(if (<= c 5.3e-11)
(fma (fma (- t) a (* z y)) x (* (* (- i) j) y))
(if (<= c 2.9e+181)
t_1
(fma (fma (- z) b (* j a)) c (* (* (- a) t) x)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((-z * b) * c) + (j * ((c * a) - (y * i)));
double tmp;
if (c <= -4e-32) {
tmp = t_1;
} else if (c <= 5.3e-11) {
tmp = fma(fma(-t, a, (z * y)), x, ((-i * j) * y));
} else if (c <= 2.9e+181) {
tmp = t_1;
} else {
tmp = fma(fma(-z, b, (j * a)), c, ((-a * t) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(-z) * b) * c) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) tmp = 0.0 if (c <= -4e-32) tmp = t_1; elseif (c <= 5.3e-11) tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, Float64(Float64(Float64(-i) * j) * y)); elseif (c <= 2.9e+181) tmp = t_1; else tmp = fma(fma(Float64(-z), b, Float64(j * a)), c, Float64(Float64(Float64(-a) * t) * x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[((-z) * b), $MachinePrecision] * c), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -4e-32], t$95$1, If[LessEqual[c, 5.3e-11], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.9e+181], t$95$1, N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c + N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-z\right) \cdot b\right) \cdot c + j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;c \leq -4 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 5.3 \cdot 10^{-11}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \left(\left(-i\right) \cdot j\right) \cdot y\right)\\
\mathbf{elif}\;c \leq 2.9 \cdot 10^{+181}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, b, j \cdot a\right), c, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\
\end{array}
\end{array}
if c < -4.00000000000000022e-32 or 5.2999999999999998e-11 < c < 2.9e181Initial program 75.0%
Taylor expanded in c around inf
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6468.3
Applied rewrites68.3%
if -4.00000000000000022e-32 < c < 5.2999999999999998e-11Initial program 81.4%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
+-commutativeN/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-*.f64N/A
*-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-*.f6468.4
Applied rewrites68.4%
Taylor expanded in y around inf
Applied rewrites69.1%
if 2.9e181 < c Initial program 62.9%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites94.1%
Taylor expanded in y around 0
Applied rewrites87.5%
Final simplification71.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1.32e+122)
(* (fma t i (* (- c) z)) b)
(if (<= b 3.35e+33)
(fma (fma (- t) a (* z y)) x (* (fma (- i) y (* c a)) j))
(* (fma (- z) c (* i t)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.32e+122) {
tmp = fma(t, i, (-c * z)) * b;
} else if (b <= 3.35e+33) {
tmp = fma(fma(-t, a, (z * y)), x, (fma(-i, y, (c * a)) * j));
} else {
tmp = fma(-z, c, (i * t)) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.32e+122) tmp = Float64(fma(t, i, Float64(Float64(-c) * z)) * b); elseif (b <= 3.35e+33) tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, Float64(fma(Float64(-i), y, Float64(c * a)) * j)); else tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.32e+122], N[(N[(t * i + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 3.35e+33], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.32 \cdot 10^{+122}:\\
\;\;\;\;\mathsf{fma}\left(t, i, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -1.31999999999999992e122Initial program 85.0%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6485.6
Applied rewrites85.6%
Applied rewrites85.6%
if -1.31999999999999992e122 < b < 3.35e33Initial program 75.7%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
+-commutativeN/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-*.f64N/A
*-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.8
Applied rewrites73.8%
if 3.35e33 < b Initial program 74.5%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6469.1
Applied rewrites69.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -2.3e+138)
(* (fma t i (* (- c) z)) b)
(if (<= b 3.35e+33)
(fma (fma (- t) a (* z y)) x (* (* (- i) j) y))
(* (fma (- z) c (* i t)) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -2.3e+138) {
tmp = fma(t, i, (-c * z)) * b;
} else if (b <= 3.35e+33) {
tmp = fma(fma(-t, a, (z * y)), x, ((-i * j) * y));
} else {
tmp = fma(-z, c, (i * t)) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -2.3e+138) tmp = Float64(fma(t, i, Float64(Float64(-c) * z)) * b); elseif (b <= 3.35e+33) tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, Float64(Float64(Float64(-i) * j) * y)); else tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -2.3e+138], N[(N[(t * i + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 3.35e+33], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{+138}:\\
\;\;\;\;\mathsf{fma}\left(t, i, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \left(\left(-i\right) \cdot j\right) \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -2.30000000000000008e138Initial program 84.5%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6485.1
Applied rewrites85.1%
Applied rewrites85.1%
if -2.30000000000000008e138 < b < 3.35e33Initial program 75.9%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
+-commutativeN/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-*.f64N/A
*-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.4
Applied rewrites73.4%
Taylor expanded in y around inf
Applied rewrites65.5%
if 3.35e33 < b Initial program 74.5%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6469.1
Applied rewrites69.1%
Final simplification68.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* t i) b)))
(if (<= b -3.8e+122)
t_1
(if (<= b -4.2e-214)
(* (* (- y) i) j)
(if (<= b 2.85e-95)
(* (* x y) z)
(if (<= b 0.152)
(* (* (- i) j) y)
(if (<= b 2.9e+187) (* (* (- b) c) 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 = (t * i) * b;
double tmp;
if (b <= -3.8e+122) {
tmp = t_1;
} else if (b <= -4.2e-214) {
tmp = (-y * i) * j;
} else if (b <= 2.85e-95) {
tmp = (x * y) * z;
} else if (b <= 0.152) {
tmp = (-i * j) * y;
} else if (b <= 2.9e+187) {
tmp = (-b * c) * z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (t * i) * b
if (b <= (-3.8d+122)) then
tmp = t_1
else if (b <= (-4.2d-214)) then
tmp = (-y * i) * j
else if (b <= 2.85d-95) then
tmp = (x * y) * z
else if (b <= 0.152d0) then
tmp = (-i * j) * y
else if (b <= 2.9d+187) then
tmp = (-b * c) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (t * i) * b;
double tmp;
if (b <= -3.8e+122) {
tmp = t_1;
} else if (b <= -4.2e-214) {
tmp = (-y * i) * j;
} else if (b <= 2.85e-95) {
tmp = (x * y) * z;
} else if (b <= 0.152) {
tmp = (-i * j) * y;
} else if (b <= 2.9e+187) {
tmp = (-b * c) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (t * i) * b tmp = 0 if b <= -3.8e+122: tmp = t_1 elif b <= -4.2e-214: tmp = (-y * i) * j elif b <= 2.85e-95: tmp = (x * y) * z elif b <= 0.152: tmp = (-i * j) * y elif b <= 2.9e+187: tmp = (-b * c) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(t * i) * b) tmp = 0.0 if (b <= -3.8e+122) tmp = t_1; elseif (b <= -4.2e-214) tmp = Float64(Float64(Float64(-y) * i) * j); elseif (b <= 2.85e-95) tmp = Float64(Float64(x * y) * z); elseif (b <= 0.152) tmp = Float64(Float64(Float64(-i) * j) * y); elseif (b <= 2.9e+187) tmp = Float64(Float64(Float64(-b) * c) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (t * i) * b; tmp = 0.0; if (b <= -3.8e+122) tmp = t_1; elseif (b <= -4.2e-214) tmp = (-y * i) * j; elseif (b <= 2.85e-95) tmp = (x * y) * z; elseif (b <= 0.152) tmp = (-i * j) * y; elseif (b <= 2.9e+187) tmp = (-b * c) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -3.8e+122], t$95$1, If[LessEqual[b, -4.2e-214], N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[b, 2.85e-95], N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, 0.152], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[b, 2.9e+187], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t \cdot i\right) \cdot b\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+122}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-214}:\\
\;\;\;\;\left(\left(-y\right) \cdot i\right) \cdot j\\
\mathbf{elif}\;b \leq 2.85 \cdot 10^{-95}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z\\
\mathbf{elif}\;b \leq 0.152:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+187}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -3.7999999999999998e122 or 2.9000000000000001e187 < b Initial program 79.2%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6477.2
Applied rewrites77.2%
Taylor expanded in z around 0
Applied rewrites52.9%
if -3.7999999999999998e122 < b < -4.19999999999999984e-214Initial program 73.1%
Taylor expanded in j around -inf
Applied rewrites71.7%
Taylor expanded in j around inf
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6448.9
Applied rewrites48.9%
Taylor expanded in y around inf
Applied rewrites38.1%
if -4.19999999999999984e-214 < b < 2.85e-95Initial program 74.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-*.f6446.0
Applied rewrites46.0%
Taylor expanded in x around inf
Applied rewrites41.6%
if 2.85e-95 < b < 0.151999999999999996Initial program 86.0%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites57.1%
Taylor expanded in y 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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites49.5%
if 0.151999999999999996 < b < 2.9000000000000001e187Initial program 75.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-*.f6463.4
Applied rewrites63.4%
Taylor expanded in x around 0
Applied rewrites53.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- y) i) j)) (t_2 (* (* t i) b)))
(if (<= b -3.8e+122)
t_2
(if (<= b -4.2e-214)
t_1
(if (<= b 9.5e-95)
(* (* x y) z)
(if (<= b 0.245) t_1 (if (<= b 2.9e+187) (* (* (- b) c) z) 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 = (-y * i) * j;
double t_2 = (t * i) * b;
double tmp;
if (b <= -3.8e+122) {
tmp = t_2;
} else if (b <= -4.2e-214) {
tmp = t_1;
} else if (b <= 9.5e-95) {
tmp = (x * y) * z;
} else if (b <= 0.245) {
tmp = t_1;
} else if (b <= 2.9e+187) {
tmp = (-b * c) * z;
} 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 = (-y * i) * j
t_2 = (t * i) * b
if (b <= (-3.8d+122)) then
tmp = t_2
else if (b <= (-4.2d-214)) then
tmp = t_1
else if (b <= 9.5d-95) then
tmp = (x * y) * z
else if (b <= 0.245d0) then
tmp = t_1
else if (b <= 2.9d+187) then
tmp = (-b * c) * z
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 = (-y * i) * j;
double t_2 = (t * i) * b;
double tmp;
if (b <= -3.8e+122) {
tmp = t_2;
} else if (b <= -4.2e-214) {
tmp = t_1;
} else if (b <= 9.5e-95) {
tmp = (x * y) * z;
} else if (b <= 0.245) {
tmp = t_1;
} else if (b <= 2.9e+187) {
tmp = (-b * c) * z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-y * i) * j t_2 = (t * i) * b tmp = 0 if b <= -3.8e+122: tmp = t_2 elif b <= -4.2e-214: tmp = t_1 elif b <= 9.5e-95: tmp = (x * y) * z elif b <= 0.245: tmp = t_1 elif b <= 2.9e+187: tmp = (-b * c) * z else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-y) * i) * j) t_2 = Float64(Float64(t * i) * b) tmp = 0.0 if (b <= -3.8e+122) tmp = t_2; elseif (b <= -4.2e-214) tmp = t_1; elseif (b <= 9.5e-95) tmp = Float64(Float64(x * y) * z); elseif (b <= 0.245) tmp = t_1; elseif (b <= 2.9e+187) tmp = Float64(Float64(Float64(-b) * c) * z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-y * i) * j; t_2 = (t * i) * b; tmp = 0.0; if (b <= -3.8e+122) tmp = t_2; elseif (b <= -4.2e-214) tmp = t_1; elseif (b <= 9.5e-95) tmp = (x * y) * z; elseif (b <= 0.245) tmp = t_1; elseif (b <= 2.9e+187) tmp = (-b * c) * z; 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[((-y) * i), $MachinePrecision] * j), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -3.8e+122], t$95$2, If[LessEqual[b, -4.2e-214], t$95$1, If[LessEqual[b, 9.5e-95], N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, 0.245], t$95$1, If[LessEqual[b, 2.9e+187], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-y\right) \cdot i\right) \cdot j\\
t_2 := \left(t \cdot i\right) \cdot b\\
\mathbf{if}\;b \leq -3.8 \cdot 10^{+122}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-214}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-95}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z\\
\mathbf{elif}\;b \leq 0.245:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+187}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.7999999999999998e122 or 2.9000000000000001e187 < b Initial program 79.2%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6477.2
Applied rewrites77.2%
Taylor expanded in z around 0
Applied rewrites52.9%
if -3.7999999999999998e122 < b < -4.19999999999999984e-214 or 9.49999999999999998e-95 < b < 0.245Initial program 77.0%
Taylor expanded in j around -inf
Applied rewrites74.9%
Taylor expanded in j around inf
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6453.4
Applied rewrites53.4%
Taylor expanded in y around inf
Applied rewrites40.5%
if -4.19999999999999984e-214 < b < 9.49999999999999998e-95Initial program 74.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-*.f6446.0
Applied rewrites46.0%
Taylor expanded in x around inf
Applied rewrites41.6%
if 0.245 < b < 2.9000000000000001e187Initial program 75.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-*.f6463.4
Applied rewrites63.4%
Taylor expanded in x around 0
Applied rewrites53.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* t i) b)))
(if (<= b -1.65e+79)
t_1
(if (<= b -4.2e-214)
(* (- i) (* j y))
(if (<= b 8e-35)
(* (* x y) z)
(if (<= b 2.9e+187) (* (* (- b) c) 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 = (t * i) * b;
double tmp;
if (b <= -1.65e+79) {
tmp = t_1;
} else if (b <= -4.2e-214) {
tmp = -i * (j * y);
} else if (b <= 8e-35) {
tmp = (x * y) * z;
} else if (b <= 2.9e+187) {
tmp = (-b * c) * z;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (t * i) * b
if (b <= (-1.65d+79)) then
tmp = t_1
else if (b <= (-4.2d-214)) then
tmp = -i * (j * y)
else if (b <= 8d-35) then
tmp = (x * y) * z
else if (b <= 2.9d+187) then
tmp = (-b * c) * z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (t * i) * b;
double tmp;
if (b <= -1.65e+79) {
tmp = t_1;
} else if (b <= -4.2e-214) {
tmp = -i * (j * y);
} else if (b <= 8e-35) {
tmp = (x * y) * z;
} else if (b <= 2.9e+187) {
tmp = (-b * c) * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (t * i) * b tmp = 0 if b <= -1.65e+79: tmp = t_1 elif b <= -4.2e-214: tmp = -i * (j * y) elif b <= 8e-35: tmp = (x * y) * z elif b <= 2.9e+187: tmp = (-b * c) * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(t * i) * b) tmp = 0.0 if (b <= -1.65e+79) tmp = t_1; elseif (b <= -4.2e-214) tmp = Float64(Float64(-i) * Float64(j * y)); elseif (b <= 8e-35) tmp = Float64(Float64(x * y) * z); elseif (b <= 2.9e+187) tmp = Float64(Float64(Float64(-b) * c) * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (t * i) * b; tmp = 0.0; if (b <= -1.65e+79) tmp = t_1; elseif (b <= -4.2e-214) tmp = -i * (j * y); elseif (b <= 8e-35) tmp = (x * y) * z; elseif (b <= 2.9e+187) tmp = (-b * c) * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.65e+79], t$95$1, If[LessEqual[b, -4.2e-214], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 8e-35], N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[b, 2.9e+187], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t \cdot i\right) \cdot b\\
\mathbf{if}\;b \leq -1.65 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-214}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{elif}\;b \leq 8 \cdot 10^{-35}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z\\
\mathbf{elif}\;b \leq 2.9 \cdot 10^{+187}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.6500000000000001e79 or 2.9000000000000001e187 < b Initial program 79.9%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6472.2
Applied rewrites72.2%
Taylor expanded in z around 0
Applied rewrites48.3%
if -1.6500000000000001e79 < b < -4.19999999999999984e-214Initial program 71.1%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites54.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.1
Applied rewrites55.1%
Taylor expanded in x around 0
Applied rewrites36.9%
if -4.19999999999999984e-214 < b < 8.00000000000000006e-35Initial program 76.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.3
Applied rewrites43.3%
Taylor expanded in x around inf
Applied rewrites38.2%
if 8.00000000000000006e-35 < b < 2.9000000000000001e187Initial program 77.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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites47.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -1.4e+129) (not (<= b 3.2e-11))) (* (fma t i (* (- c) z)) b) (* (fma (- i) j (* z x)) y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -1.4e+129) || !(b <= 3.2e-11)) {
tmp = fma(t, i, (-c * z)) * b;
} else {
tmp = fma(-i, j, (z * x)) * y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -1.4e+129) || !(b <= 3.2e-11)) tmp = Float64(fma(t, i, Float64(Float64(-c) * z)) * b); else tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -1.4e+129], N[Not[LessEqual[b, 3.2e-11]], $MachinePrecision]], N[(N[(t * i + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+129} \lor \neg \left(b \leq 3.2 \cdot 10^{-11}\right):\\
\;\;\;\;\mathsf{fma}\left(t, i, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if b < -1.39999999999999987e129 or 3.19999999999999994e-11 < b Initial program 77.6%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6470.9
Applied rewrites70.9%
Applied rewrites70.9%
if -1.39999999999999987e129 < b < 3.19999999999999994e-11Initial program 75.9%
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-*.f6457.4
Applied rewrites57.4%
Final simplification63.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -5.1e-5) (not (<= b 5.8e-66))) (* (fma t i (* (- c) z)) b) (* (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 ((b <= -5.1e-5) || !(b <= 5.8e-66)) {
tmp = fma(t, i, (-c * z)) * b;
} 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 ((b <= -5.1e-5) || !(b <= 5.8e-66)) tmp = Float64(fma(t, i, Float64(Float64(-c) * z)) * b); 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[Or[LessEqual[b, -5.1e-5], N[Not[LessEqual[b, 5.8e-66]], $MachinePrecision]], N[(N[(t * i + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.1 \cdot 10^{-5} \lor \neg \left(b \leq 5.8 \cdot 10^{-66}\right):\\
\;\;\;\;\mathsf{fma}\left(t, i, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if b < -5.09999999999999996e-5 or 5.80000000000000023e-66 < b Initial program 77.2%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6461.9
Applied rewrites61.9%
Applied rewrites61.9%
if -5.09999999999999996e-5 < b < 5.80000000000000023e-66Initial program 75.7%
Taylor expanded in j around -inf
Applied rewrites77.9%
Taylor expanded in x around inf
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.8
Applied rewrites52.8%
Final simplification58.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= y -8e+64) (* (* (- y) i) j) (if (<= y 3.6e+192) (* (fma t i (* (- c) z)) b) (* (- i) (* j y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (y <= -8e+64) {
tmp = (-y * i) * j;
} else if (y <= 3.6e+192) {
tmp = fma(t, i, (-c * z)) * b;
} else {
tmp = -i * (j * y);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -8e+64) tmp = Float64(Float64(Float64(-y) * i) * j); elseif (y <= 3.6e+192) tmp = Float64(fma(t, i, Float64(Float64(-c) * z)) * b); else tmp = Float64(Float64(-i) * Float64(j * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -8e+64], N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 3.6e+192], N[(N[(t * i + N[((-c) * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+64}:\\
\;\;\;\;\left(\left(-y\right) \cdot i\right) \cdot j\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{+192}:\\
\;\;\;\;\mathsf{fma}\left(t, i, \left(-c\right) \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\end{array}
\end{array}
if y < -8.00000000000000017e64Initial program 73.2%
Taylor expanded in j around -inf
Applied rewrites84.3%
Taylor expanded in j around inf
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6460.4
Applied rewrites60.4%
Taylor expanded in y around inf
Applied rewrites55.1%
if -8.00000000000000017e64 < y < 3.6000000000000002e192Initial program 78.7%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6449.8
Applied rewrites49.8%
Applied rewrites50.9%
if 3.6000000000000002e192 < y Initial program 69.2%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites61.5%
Taylor expanded in y 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-*.f6488.3
Applied rewrites88.3%
Taylor expanded in x around 0
Applied rewrites64.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.16e+157)
(* (* (- c) z) b)
(if (<= z 4.8e-249)
(* (* (- i) j) y)
(if (<= z 2.4e+22) (* (* t i) b) (* (* z x) y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.16e+157) {
tmp = (-c * z) * b;
} else if (z <= 4.8e-249) {
tmp = (-i * j) * y;
} else if (z <= 2.4e+22) {
tmp = (t * i) * b;
} else {
tmp = (z * x) * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-1.16d+157)) then
tmp = (-c * z) * b
else if (z <= 4.8d-249) then
tmp = (-i * j) * y
else if (z <= 2.4d+22) then
tmp = (t * i) * b
else
tmp = (z * x) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.16e+157) {
tmp = (-c * z) * b;
} else if (z <= 4.8e-249) {
tmp = (-i * j) * y;
} else if (z <= 2.4e+22) {
tmp = (t * i) * b;
} else {
tmp = (z * x) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.16e+157: tmp = (-c * z) * b elif z <= 4.8e-249: tmp = (-i * j) * y elif z <= 2.4e+22: tmp = (t * i) * b else: tmp = (z * x) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.16e+157) tmp = Float64(Float64(Float64(-c) * z) * b); elseif (z <= 4.8e-249) tmp = Float64(Float64(Float64(-i) * j) * y); elseif (z <= 2.4e+22) tmp = Float64(Float64(t * i) * b); else tmp = Float64(Float64(z * x) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.16e+157) tmp = (-c * z) * b; elseif (z <= 4.8e-249) tmp = (-i * j) * y; elseif (z <= 2.4e+22) tmp = (t * i) * b; else tmp = (z * x) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.16e+157], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 4.8e-249], N[(N[((-i) * j), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 2.4e+22], N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+157}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-249}:\\
\;\;\;\;\left(\left(-i\right) \cdot j\right) \cdot y\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+22}:\\
\;\;\;\;\left(t \cdot i\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if z < -1.16000000000000004e157Initial program 63.5%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6470.9
Applied rewrites70.9%
Taylor expanded in z around inf
Applied rewrites59.9%
if -1.16000000000000004e157 < z < 4.80000000000000026e-249Initial program 82.4%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites48.0%
Taylor expanded in y 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-*.f6450.1
Applied rewrites50.1%
Taylor expanded in x around 0
Applied rewrites44.1%
if 4.80000000000000026e-249 < z < 2.4e22Initial program 85.5%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6438.9
Applied rewrites38.9%
Taylor expanded in z around 0
Applied rewrites28.9%
if 2.4e22 < z Initial program 64.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-*.f6467.2
Applied rewrites67.2%
Taylor expanded in x around inf
Applied rewrites45.2%
Applied rewrites47.9%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= x -7.2e+124) (* (* z y) x) (if (<= x 7e+27) (* (- i) (* j y)) (* (* 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 <= -7.2e+124) {
tmp = (z * y) * x;
} else if (x <= 7e+27) {
tmp = -i * (j * y);
} 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 (x <= (-7.2d+124)) then
tmp = (z * y) * x
else if (x <= 7d+27) then
tmp = -i * (j * y)
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 (x <= -7.2e+124) {
tmp = (z * y) * x;
} else if (x <= 7e+27) {
tmp = -i * (j * y);
} else {
tmp = (z * x) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -7.2e+124: tmp = (z * y) * x elif x <= 7e+27: tmp = -i * (j * y) else: tmp = (z * x) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -7.2e+124) tmp = Float64(Float64(z * y) * x); elseif (x <= 7e+27) tmp = Float64(Float64(-i) * Float64(j * y)); 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 (x <= -7.2e+124) tmp = (z * y) * x; elseif (x <= 7e+27) tmp = -i * (j * y); else tmp = (z * x) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -7.2e+124], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[x, 7e+27], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+124}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;x \leq 7 \cdot 10^{+27}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if x < -7.19999999999999972e124Initial program 77.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6460.5
Applied rewrites60.5%
Taylor expanded in x around inf
Applied rewrites51.4%
if -7.19999999999999972e124 < x < 7.0000000000000004e27Initial program 80.2%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-out--N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites47.3%
Taylor expanded in y 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-*.f6448.2
Applied rewrites48.2%
Taylor expanded in x around 0
Applied rewrites36.1%
if 7.0000000000000004e27 < x Initial program 68.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-*.f6452.2
Applied rewrites52.2%
Taylor expanded in x around inf
Applied rewrites37.5%
Applied rewrites40.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= a -8.6e+52) (not (<= a 3.1e+38))) (* (* c a) j) (* (* 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 ((a <= -8.6e+52) || !(a <= 3.1e+38)) {
tmp = (c * a) * j;
} else {
tmp = (z * y) * x;
}
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 ((a <= (-8.6d+52)) .or. (.not. (a <= 3.1d+38))) then
tmp = (c * a) * j
else
tmp = (z * y) * x
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 ((a <= -8.6e+52) || !(a <= 3.1e+38)) {
tmp = (c * a) * j;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (a <= -8.6e+52) or not (a <= 3.1e+38): tmp = (c * a) * j else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((a <= -8.6e+52) || !(a <= 3.1e+38)) tmp = Float64(Float64(c * a) * j); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((a <= -8.6e+52) || ~((a <= 3.1e+38))) tmp = (c * a) * j; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[a, -8.6e+52], N[Not[LessEqual[a, 3.1e+38]], $MachinePrecision]], N[(N[(c * a), $MachinePrecision] * j), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{+52} \lor \neg \left(a \leq 3.1 \cdot 10^{+38}\right):\\
\;\;\;\;\left(c \cdot a\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if a < -8.5999999999999999e52 or 3.10000000000000018e38 < a Initial program 65.9%
Taylor expanded in j around -inf
Applied rewrites72.8%
Taylor expanded in j around inf
*-commutativeN/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6458.4
Applied rewrites58.4%
Taylor expanded in y around 0
Applied rewrites41.1%
if -8.5999999999999999e52 < a < 3.10000000000000018e38Initial program 82.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6448.4
Applied rewrites48.4%
Taylor expanded in x around inf
Applied rewrites27.9%
Final simplification32.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z -1.15e+71) (* (* x y) z) (if (<= z 2.4e+22) (* (* t i) b) (* (* z x) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.15e+71) {
tmp = (x * y) * z;
} else if (z <= 2.4e+22) {
tmp = (t * i) * b;
} else {
tmp = (z * x) * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-1.15d+71)) then
tmp = (x * y) * z
else if (z <= 2.4d+22) then
tmp = (t * i) * b
else
tmp = (z * x) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.15e+71) {
tmp = (x * y) * z;
} else if (z <= 2.4e+22) {
tmp = (t * i) * b;
} else {
tmp = (z * x) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.15e+71: tmp = (x * y) * z elif z <= 2.4e+22: tmp = (t * i) * b else: tmp = (z * x) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.15e+71) tmp = Float64(Float64(x * y) * z); elseif (z <= 2.4e+22) tmp = Float64(Float64(t * i) * b); else tmp = Float64(Float64(z * x) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.15e+71) tmp = (x * y) * z; elseif (z <= 2.4e+22) tmp = (t * i) * b; else tmp = (z * x) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.15e+71], N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 2.4e+22], N[(N[(t * i), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+71}:\\
\;\;\;\;\left(x \cdot y\right) \cdot z\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+22}:\\
\;\;\;\;\left(t \cdot i\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if z < -1.1500000000000001e71Initial program 70.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-*.f6470.2
Applied rewrites70.2%
Taylor expanded in x around inf
Applied rewrites49.3%
if -1.1500000000000001e71 < z < 2.4e22Initial program 83.9%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-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
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in z around 0
Applied rewrites27.2%
if 2.4e22 < z Initial program 64.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-*.f6467.2
Applied rewrites67.2%
Taylor expanded in x around inf
Applied rewrites45.2%
Applied rewrites47.9%
(FPCore (x y z t a b c i j) :precision binary64 (* (* x y) z))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (x * y) * z;
}
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
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;
}
def code(x, y, z, t, a, b, c, i, j): return (x * y) * z
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(x * y) * z) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (x * y) * z; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(x * y), $MachinePrecision] * z), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot y\right) \cdot z
\end{array}
Initial program 76.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.4
Applied rewrites41.4%
Taylor expanded in x around inf
Applied rewrites25.1%
(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 76.6%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.4
Applied rewrites41.4%
Taylor expanded in x around inf
Applied rewrites24.4%
Applied rewrites25.0%
(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 2024313
(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)))))