
(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 25 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= y -1.2e-84)
(*
(fma
(fma (- z) c (* i t))
(/ b y)
(fma (- i) j (fma z x (/ (* (fma (- x) t (* j c)) a) y))))
y)
(if (<= y 2.8e+212)
(fma
(fma (- i) y (* c a))
j
(fma (fma (- x) a (* i b)) t (* (fma (- c) b (* y x)) z)))
(* (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 (y <= -1.2e-84) {
tmp = fma(fma(-z, c, (i * t)), (b / y), fma(-i, j, fma(z, x, ((fma(-x, t, (j * c)) * a) / y)))) * y;
} else if (y <= 2.8e+212) {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-x, a, (i * b)), t, (fma(-c, b, (y * x)) * z)));
} 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 (y <= -1.2e-84) tmp = Float64(fma(fma(Float64(-z), c, Float64(i * t)), Float64(b / y), fma(Float64(-i), j, fma(z, x, Float64(Float64(fma(Float64(-x), t, Float64(j * c)) * a) / y)))) * y); elseif (y <= 2.8e+212) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(fma(Float64(-c), b, Float64(y * x)) * z))); else tmp = 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[y, -1.2e-84], N[(N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * N[(b / y), $MachinePrecision] + N[((-i) * j + N[(z * x + N[(N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 2.8e+212], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{-84}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-z, c, i \cdot t\right), \frac{b}{y}, \mathsf{fma}\left(-i, j, \mathsf{fma}\left(z, x, \frac{\mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a}{y}\right)\right)\right) \cdot y\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+212}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if y < -1.20000000000000009e-84Initial program 65.5%
Taylor expanded in y around inf
Applied rewrites79.3%
if -1.20000000000000009e-84 < y < 2.79999999999999997e212Initial program 77.7%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites85.1%
if 2.79999999999999997e212 < y Initial program 50.3%
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-*.f6488.9
Applied rewrites88.9%
Final simplification83.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* c z) (* t i)))) (t_2 (* j (- (* c a) (* y i)))))
(if (<= (+ (- (* x (- (* y z) (* t a))) t_1) t_2) INFINITY)
(+ (- (/ x (pow (fma (- a) t (* z y)) -1.0)) t_1) t_2)
(* (fma (- y) j (* b t)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((c * z) - (t * i));
double t_2 = j * ((c * a) - (y * i));
double tmp;
if ((((x * ((y * z) - (t * a))) - t_1) + t_2) <= ((double) INFINITY)) {
tmp = ((x / pow(fma(-a, t, (z * y)), -1.0)) - t_1) + t_2;
} else {
tmp = fma(-y, j, (b * t)) * i;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(c * z) - Float64(t * i))) t_2 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - t_1) + t_2) <= Inf) tmp = Float64(Float64(Float64(x / (fma(Float64(-a), t, Float64(z * y)) ^ -1.0)) - t_1) + t_2); else tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision], Infinity], N[(N[(N[(x / N[Power[N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(c \cdot z - t \cdot i\right)\\
t_2 := j \cdot \left(c \cdot a - y \cdot i\right)\\
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - t\_1\right) + t\_2 \leq \infty:\\
\;\;\;\;\left(\frac{x}{{\left(\mathsf{fma}\left(-a, t, z \cdot y\right)\right)}^{-1}} - t\_1\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 88.7%
lift-*.f64N/A
lift--.f64N/A
flip--N/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
clear-numN/A
flip--N/A
lift--.f64N/A
lower-/.f6488.7
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6488.7
lift-*.f64N/A
*-commutativeN/A
lower-*.f6488.7
Applied rewrites88.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6450.7
Applied rewrites50.7%
Final simplification81.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* (fma (- y) j (* b t)) i))))
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(-y, j, (b * t)) * i;
}
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(-y), j, Float64(b * t)) * i); 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[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $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(-y, j, b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 88.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6450.7
Applied rewrites50.7%
Final simplification81.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -7.2e+160)
(fma (fma (- y) j (* b t)) i (* (fma (- t) a (* z y)) x))
(fma
(fma (- i) y (* c a))
j
(fma (fma (- x) a (* i b)) t (* (fma (- c) b (* 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 (x <= -7.2e+160) {
tmp = fma(fma(-y, j, (b * t)), i, (fma(-t, a, (z * y)) * x));
} else {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-x, a, (i * b)), t, (fma(-c, b, (y * x)) * z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -7.2e+160) tmp = fma(fma(Float64(-y), j, Float64(b * t)), i, Float64(fma(Float64(-t), a, Float64(z * y)) * x)); else tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(fma(Float64(-c), b, Float64(y * x)) * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -7.2e+160], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.2 \cdot 10^{+160}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, j, b \cdot t\right), i, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\right)\right)\\
\end{array}
\end{array}
if x < -7.20000000000000042e160Initial program 73.9%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/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 rewrites81.7%
if -7.20000000000000042e160 < x Initial program 70.9%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites80.0%
Final simplification80.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) t (* j c)) a)))
(if (<= z -2.1e+118)
(* (* (- (/ (* y x) c) b) c) z)
(if (<= z -5e+33)
(* (fma (- i) j (* z x)) y)
(if (<= z -2.1e-173)
(fma (- a) (* t x) (* (* i t) b))
(if (<= z 6e-301)
t_1
(if (<= z 1.55e-109)
(* (fma (- y) j (* b t)) i)
(if (<= z 1.75e+139) t_1 (* (fma (- c) b (* y x)) z)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-x, t, (j * c)) * a;
double tmp;
if (z <= -2.1e+118) {
tmp = ((((y * x) / c) - b) * c) * z;
} else if (z <= -5e+33) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= -2.1e-173) {
tmp = fma(-a, (t * x), ((i * t) * b));
} else if (z <= 6e-301) {
tmp = t_1;
} else if (z <= 1.55e-109) {
tmp = fma(-y, j, (b * t)) * i;
} else if (z <= 1.75e+139) {
tmp = t_1;
} else {
tmp = fma(-c, b, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), t, Float64(j * c)) * a) tmp = 0.0 if (z <= -2.1e+118) tmp = Float64(Float64(Float64(Float64(Float64(y * x) / c) - b) * c) * z); elseif (z <= -5e+33) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= -2.1e-173) tmp = fma(Float64(-a), Float64(t * x), Float64(Float64(i * t) * b)); elseif (z <= 6e-301) tmp = t_1; elseif (z <= 1.55e-109) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); elseif (z <= 1.75e+139) tmp = t_1; else tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[z, -2.1e+118], N[(N[(N[(N[(N[(y * x), $MachinePrecision] / c), $MachinePrecision] - b), $MachinePrecision] * c), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, -5e+33], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -2.1e-173], N[((-a) * N[(t * x), $MachinePrecision] + N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-301], t$95$1, If[LessEqual[z, 1.55e-109], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 1.75e+139], t$95$1, N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+118}:\\
\;\;\;\;\left(\left(\frac{y \cdot x}{c} - b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-173}:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \left(i \cdot t\right) \cdot b\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-109}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < -2.1e118Initial program 69.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-*.f6474.0
Applied rewrites74.0%
Taylor expanded in c around inf
Applied rewrites74.0%
if -2.1e118 < z < -4.99999999999999973e33Initial program 67.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-*.f6462.7
Applied rewrites62.7%
if -4.99999999999999973e33 < z < -2.10000000000000001e-173Initial program 81.8%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/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.0%
Taylor expanded in y around 0
Applied rewrites61.1%
if -2.10000000000000001e-173 < z < 5.99999999999999998e-301 or 1.55e-109 < z < 1.74999999999999989e139Initial program 68.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.5
Applied rewrites59.5%
if 5.99999999999999998e-301 < z < 1.55e-109Initial program 72.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
if 1.74999999999999989e139 < z Initial program 71.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-*.f6484.7
Applied rewrites84.7%
Final simplification67.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) t (* j c)) a)) (t_2 (* (fma (- c) b (* y x)) z)))
(if (<= z -2.1e+118)
t_2
(if (<= z -5e+33)
(* (fma (- i) j (* z x)) y)
(if (<= z -2.1e-173)
(fma (- a) (* t x) (* (* i t) b))
(if (<= z 6e-301)
t_1
(if (<= z 1.55e-109)
(* (fma (- y) j (* b t)) i)
(if (<= z 1.75e+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 = fma(-x, t, (j * c)) * a;
double t_2 = fma(-c, b, (y * x)) * z;
double tmp;
if (z <= -2.1e+118) {
tmp = t_2;
} else if (z <= -5e+33) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= -2.1e-173) {
tmp = fma(-a, (t * x), ((i * t) * b));
} else if (z <= 6e-301) {
tmp = t_1;
} else if (z <= 1.55e-109) {
tmp = fma(-y, j, (b * t)) * i;
} else if (z <= 1.75e+139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), t, Float64(j * c)) * a) t_2 = Float64(fma(Float64(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -2.1e+118) tmp = t_2; elseif (z <= -5e+33) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= -2.1e-173) tmp = fma(Float64(-a), Float64(t * x), Float64(Float64(i * t) * b)); elseif (z <= 6e-301) tmp = t_1; elseif (z <= 1.55e-109) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); elseif (z <= 1.75e+139) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.1e+118], t$95$2, If[LessEqual[z, -5e+33], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -2.1e-173], N[((-a) * N[(t * x), $MachinePrecision] + N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-301], t$95$1, If[LessEqual[z, 1.55e-109], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 1.75e+139], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
t_2 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+118}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -2.1 \cdot 10^{-173}:\\
\;\;\;\;\mathsf{fma}\left(-a, t \cdot x, \left(i \cdot t\right) \cdot b\right)\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-109}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.1e118 or 1.74999999999999989e139 < z Initial program 70.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-*.f6479.3
Applied rewrites79.3%
if -2.1e118 < z < -4.99999999999999973e33Initial program 67.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-*.f6462.7
Applied rewrites62.7%
if -4.99999999999999973e33 < z < -2.10000000000000001e-173Initial program 81.8%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/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.0%
Taylor expanded in y around 0
Applied rewrites61.1%
if -2.10000000000000001e-173 < z < 5.99999999999999998e-301 or 1.55e-109 < z < 1.74999999999999989e139Initial program 68.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.5
Applied rewrites59.5%
if 5.99999999999999998e-301 < z < 1.55e-109Initial program 72.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6462.5
Applied rewrites62.5%
Final simplification67.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x))
(t_2 (* (fma (- i) j (* z x)) y))
(t_3 (* (fma (- c) b (* y x)) z)))
(if (<= z -2.1e+118)
t_3
(if (<= z -1e+33)
t_2
(if (<= z -2.95e-294)
t_1
(if (<= z 5e-158)
(* (* i t) b)
(if (<= z 9.2e-38) t_2 (if (<= z 1.9e+139) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double t_2 = fma(-i, j, (z * x)) * y;
double t_3 = fma(-c, b, (y * x)) * z;
double tmp;
if (z <= -2.1e+118) {
tmp = t_3;
} else if (z <= -1e+33) {
tmp = t_2;
} else if (z <= -2.95e-294) {
tmp = t_1;
} else if (z <= 5e-158) {
tmp = (i * t) * b;
} else if (z <= 9.2e-38) {
tmp = t_2;
} else if (z <= 1.9e+139) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) t_2 = Float64(fma(Float64(-i), j, Float64(z * x)) * y) t_3 = Float64(fma(Float64(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -2.1e+118) tmp = t_3; elseif (z <= -1e+33) tmp = t_2; elseif (z <= -2.95e-294) tmp = t_1; elseif (z <= 5e-158) tmp = Float64(Float64(i * t) * b); elseif (z <= 9.2e-38) tmp = t_2; elseif (z <= 1.9e+139) tmp = t_1; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.1e+118], t$95$3, If[LessEqual[z, -1e+33], t$95$2, If[LessEqual[z, -2.95e-294], t$95$1, If[LessEqual[z, 5e-158], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 9.2e-38], t$95$2, If[LessEqual[z, 1.9e+139], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
t_2 := \mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
t_3 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+118}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.95 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-158}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{-38}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -2.1e118 or 1.9e139 < z Initial program 70.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-*.f6479.3
Applied rewrites79.3%
if -2.1e118 < z < -9.9999999999999995e32 or 4.99999999999999972e-158 < z < 9.20000000000000007e-38Initial 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-*.f6457.9
Applied rewrites57.9%
if -9.9999999999999995e32 < z < -2.94999999999999997e-294 or 9.20000000000000007e-38 < z < 1.9e139Initial program 73.2%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites75.3%
Taylor expanded in x 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
*-commutativeN/A
lower-*.f6445.9
Applied rewrites45.9%
if -2.94999999999999997e-294 < z < 4.99999999999999972e-158Initial program 71.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-*.f6447.2
Applied rewrites47.2%
Taylor expanded in z around 0
Applied rewrites44.2%
Final simplification59.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x))
(t_2 (* (* (- j) i) y))
(t_3 (* (fma (- c) b (* y x)) z)))
(if (<= z -9.5e+107)
t_3
(if (<= z -1.8e+44)
t_2
(if (<= z -2.95e-294)
t_1
(if (<= z 5.2e-158)
(* (* i t) b)
(if (<= z 4.7e-49) t_2 (if (<= z 1.9e+139) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double t_2 = (-j * i) * y;
double t_3 = fma(-c, b, (y * x)) * z;
double tmp;
if (z <= -9.5e+107) {
tmp = t_3;
} else if (z <= -1.8e+44) {
tmp = t_2;
} else if (z <= -2.95e-294) {
tmp = t_1;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 4.7e-49) {
tmp = t_2;
} else if (z <= 1.9e+139) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) t_2 = Float64(Float64(Float64(-j) * i) * y) t_3 = Float64(fma(Float64(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -9.5e+107) tmp = t_3; elseif (z <= -1.8e+44) tmp = t_2; elseif (z <= -2.95e-294) tmp = t_1; elseif (z <= 5.2e-158) tmp = Float64(Float64(i * t) * b); elseif (z <= 4.7e-49) tmp = t_2; elseif (z <= 1.9e+139) tmp = t_1; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-j) * i), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -9.5e+107], t$95$3, If[LessEqual[z, -1.8e+44], t$95$2, If[LessEqual[z, -2.95e-294], t$95$1, If[LessEqual[z, 5.2e-158], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 4.7e-49], t$95$2, If[LessEqual[z, 1.9e+139], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
t_2 := \left(\left(-j\right) \cdot i\right) \cdot y\\
t_3 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -9.5 \cdot 10^{+107}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{+44}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.95 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-158}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -9.50000000000000019e107 or 1.9e139 < z Initial program 70.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6478.5
Applied rewrites78.5%
if -9.50000000000000019e107 < z < -1.8e44 or 5.2000000000000001e-158 < z < 4.70000000000000021e-49Initial program 69.1%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites81.2%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6462.0
Applied rewrites62.0%
Taylor expanded in x around 0
Applied rewrites54.7%
if -1.8e44 < z < -2.94999999999999997e-294 or 4.70000000000000021e-49 < z < 1.9e139Initial program 73.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites75.3%
Taylor expanded in x 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
*-commutativeN/A
lower-*.f6445.1
Applied rewrites45.1%
if -2.94999999999999997e-294 < z < 5.2000000000000001e-158Initial program 71.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-*.f6447.2
Applied rewrites47.2%
Taylor expanded in z around 0
Applied rewrites44.2%
Final simplification58.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -5.4e+221)
(* (* (- (/ (* y x) c) b) c) z)
(if (<= z 1.75e-57)
(fma (fma (- x) a (* i b)) t (* (fma (- i) y (* c a)) j))
(fma (fma (- t) x (* j c)) 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 (z <= -5.4e+221) {
tmp = ((((y * x) / c) - b) * c) * z;
} else if (z <= 1.75e-57) {
tmp = fma(fma(-x, a, (i * b)), t, (fma(-i, y, (c * a)) * j));
} else {
tmp = fma(fma(-t, x, (j * c)), a, (fma(-b, c, (y * x)) * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -5.4e+221) tmp = Float64(Float64(Float64(Float64(Float64(y * x) / c) - b) * c) * z); elseif (z <= 1.75e-57) tmp = fma(fma(Float64(-x), a, Float64(i * b)), t, Float64(fma(Float64(-i), y, Float64(c * a)) * j)); else tmp = fma(fma(Float64(-t), x, Float64(j * c)), a, Float64(fma(Float64(-b), c, Float64(y * x)) * z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -5.4e+221], N[(N[(N[(N[(N[(y * x), $MachinePrecision] / c), $MachinePrecision] - b), $MachinePrecision] * c), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 1.75e-57], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+221}:\\
\;\;\;\;\left(\left(\frac{y \cdot x}{c} - b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{-57}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, a, i \cdot b\right), t, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -5.3999999999999999e221Initial program 73.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-*.f6495.1
Applied rewrites95.1%
Taylor expanded in c around inf
Applied rewrites95.1%
if -5.3999999999999999e221 < z < 1.74999999999999996e-57Initial program 73.3%
Taylor expanded in z around 0
+-commutativeN/A
associate--l+N/A
mul-1-negN/A
associate-*r*N/A
distribute-lft-neg-inN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
mul-1-negN/A
distribute-rgt-out--N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites71.5%
if 1.74999999999999996e-57 < z Initial program 67.2%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites79.3%
Taylor expanded in i around 0
Applied rewrites76.0%
Final simplification74.7%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= i -2.5e+142)
(* (* (- i) y) (- j (/ (* b t) y)))
(if (<= i 1.05e+36)
(fma (fma (- t) x (* j c)) a (* (fma (- b) c (* y x)) z))
(* (fma (- y) j (* b t)) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -2.5e+142) {
tmp = (-i * y) * (j - ((b * t) / y));
} else if (i <= 1.05e+36) {
tmp = fma(fma(-t, x, (j * c)), a, (fma(-b, c, (y * x)) * z));
} else {
tmp = fma(-y, j, (b * t)) * i;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -2.5e+142) tmp = Float64(Float64(Float64(-i) * y) * Float64(j - Float64(Float64(b * t) / y))); elseif (i <= 1.05e+36) tmp = fma(fma(Float64(-t), x, Float64(j * c)), a, Float64(fma(Float64(-b), c, Float64(y * x)) * z)); else tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -2.5e+142], N[(N[((-i) * y), $MachinePrecision] * N[(j - N[(N[(b * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.05e+36], N[(N[((-t) * x + N[(j * c), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.5 \cdot 10^{+142}:\\
\;\;\;\;\left(\left(-i\right) \cdot y\right) \cdot \left(j - \frac{b \cdot t}{y}\right)\\
\mathbf{elif}\;i \leq 1.05 \cdot 10^{+36}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, x, j \cdot c\right), a, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if i < -2.5000000000000001e142Initial program 72.2%
Taylor expanded in y around inf
Applied rewrites60.0%
Taylor expanded in i around -inf
Applied rewrites72.5%
if -2.5000000000000001e142 < i < 1.05000000000000002e36Initial program 75.4%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites83.1%
Taylor expanded in i around 0
Applied rewrites71.6%
if 1.05000000000000002e36 < i Initial program 59.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6461.5
Applied rewrites61.5%
Final simplification69.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) t (* j c)) a))
(t_2 (* (fma (- y) j (* b t)) i))
(t_3 (* (fma (- c) b (* y x)) z)))
(if (<= z -3.2e+118)
t_3
(if (<= z -3.05e-173)
t_2
(if (<= z 6e-301)
t_1
(if (<= z 1.55e-109) t_2 (if (<= z 1.75e+139) t_1 t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-x, t, (j * c)) * a;
double t_2 = fma(-y, j, (b * t)) * i;
double t_3 = fma(-c, b, (y * x)) * z;
double tmp;
if (z <= -3.2e+118) {
tmp = t_3;
} else if (z <= -3.05e-173) {
tmp = t_2;
} else if (z <= 6e-301) {
tmp = t_1;
} else if (z <= 1.55e-109) {
tmp = t_2;
} else if (z <= 1.75e+139) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), t, Float64(j * c)) * a) t_2 = Float64(fma(Float64(-y), j, Float64(b * t)) * i) t_3 = Float64(fma(Float64(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -3.2e+118) tmp = t_3; elseif (z <= -3.05e-173) tmp = t_2; elseif (z <= 6e-301) tmp = t_1; elseif (z <= 1.55e-109) tmp = t_2; elseif (z <= 1.75e+139) tmp = t_1; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$3 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -3.2e+118], t$95$3, If[LessEqual[z, -3.05e-173], t$95$2, If[LessEqual[z, 6e-301], t$95$1, If[LessEqual[z, 1.55e-109], t$95$2, If[LessEqual[z, 1.75e+139], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
t_2 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
t_3 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{+118}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;z \leq -3.05 \cdot 10^{-173}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-301}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-109}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if z < -3.20000000000000016e118 or 1.74999999999999989e139 < z Initial program 69.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-*.f6479.1
Applied rewrites79.1%
if -3.20000000000000016e118 < z < -3.0499999999999999e-173 or 5.99999999999999998e-301 < z < 1.55e-109Initial program 74.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6457.0
Applied rewrites57.0%
if -3.0499999999999999e-173 < z < 5.99999999999999998e-301 or 1.55e-109 < z < 1.74999999999999989e139Initial program 68.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.5
Applied rewrites59.5%
Final simplification65.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= t -2.9e+149) (not (<= t 3.5e+131))) (* (fma (- x) a (* i b)) t) (+ (* (* z x) y) (* 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) {
double tmp;
if ((t <= -2.9e+149) || !(t <= 3.5e+131)) {
tmp = fma(-x, a, (i * b)) * t;
} else {
tmp = ((z * x) * y) + (j * ((c * a) - (y * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((t <= -2.9e+149) || !(t <= 3.5e+131)) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); else tmp = Float64(Float64(Float64(z * x) * y) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -2.9e+149], N[Not[LessEqual[t, 3.5e+131]], $MachinePrecision]], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{+149} \lor \neg \left(t \leq 3.5 \cdot 10^{+131}\right):\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y + j \cdot \left(c \cdot a - y \cdot i\right)\\
\end{array}
\end{array}
if t < -2.9000000000000002e149 or 3.4999999999999999e131 < t Initial program 55.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6479.5
Applied rewrites79.5%
if -2.9000000000000002e149 < t < 3.4999999999999999e131Initial program 77.7%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6455.3
Applied rewrites55.3%
Final simplification62.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- j) i) y)))
(if (<= z -9.8e+107)
(* (* x z) y)
(if (<= z -3.2e+33)
t_1
(if (<= z 5.2e-158)
(* (* i t) b)
(if (<= z 2.5e-56)
t_1
(if (<= z 1.3e+77) (* (* a j) c) (* (* (- b) c) z))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-j * i) * y;
double tmp;
if (z <= -9.8e+107) {
tmp = (x * z) * y;
} else if (z <= -3.2e+33) {
tmp = t_1;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 2.5e-56) {
tmp = t_1;
} else if (z <= 1.3e+77) {
tmp = (a * j) * c;
} else {
tmp = (-b * c) * 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) :: t_1
real(8) :: tmp
t_1 = (-j * i) * y
if (z <= (-9.8d+107)) then
tmp = (x * z) * y
else if (z <= (-3.2d+33)) then
tmp = t_1
else if (z <= 5.2d-158) then
tmp = (i * t) * b
else if (z <= 2.5d-56) then
tmp = t_1
else if (z <= 1.3d+77) then
tmp = (a * j) * c
else
tmp = (-b * c) * 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 t_1 = (-j * i) * y;
double tmp;
if (z <= -9.8e+107) {
tmp = (x * z) * y;
} else if (z <= -3.2e+33) {
tmp = t_1;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 2.5e-56) {
tmp = t_1;
} else if (z <= 1.3e+77) {
tmp = (a * j) * c;
} else {
tmp = (-b * c) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-j * i) * y tmp = 0 if z <= -9.8e+107: tmp = (x * z) * y elif z <= -3.2e+33: tmp = t_1 elif z <= 5.2e-158: tmp = (i * t) * b elif z <= 2.5e-56: tmp = t_1 elif z <= 1.3e+77: tmp = (a * j) * c else: tmp = (-b * c) * z return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-j) * i) * y) tmp = 0.0 if (z <= -9.8e+107) tmp = Float64(Float64(x * z) * y); elseif (z <= -3.2e+33) tmp = t_1; elseif (z <= 5.2e-158) tmp = Float64(Float64(i * t) * b); elseif (z <= 2.5e-56) tmp = t_1; elseif (z <= 1.3e+77) tmp = Float64(Float64(a * j) * c); else tmp = Float64(Float64(Float64(-b) * c) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-j * i) * y; tmp = 0.0; if (z <= -9.8e+107) tmp = (x * z) * y; elseif (z <= -3.2e+33) tmp = t_1; elseif (z <= 5.2e-158) tmp = (i * t) * b; elseif (z <= 2.5e-56) tmp = t_1; elseif (z <= 1.3e+77) tmp = (a * j) * c; else tmp = (-b * c) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-j) * i), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -9.8e+107], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -3.2e+33], t$95$1, If[LessEqual[z, 5.2e-158], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 2.5e-56], t$95$1, If[LessEqual[z, 1.3e+77], N[(N[(a * j), $MachinePrecision] * c), $MachinePrecision], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-j\right) \cdot i\right) \cdot y\\
\mathbf{if}\;z \leq -9.8 \cdot 10^{+107}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-158}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+77}:\\
\;\;\;\;\left(a \cdot j\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\end{array}
\end{array}
if z < -9.8000000000000003e107Initial program 69.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites76.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.2
Applied rewrites47.2%
Taylor expanded in x around inf
Applied rewrites43.0%
if -9.8000000000000003e107 < z < -3.20000000000000017e33 or 5.2000000000000001e-158 < z < 2.49999999999999999e-56Initial program 70.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites83.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.1
Applied rewrites61.1%
Taylor expanded in x around 0
Applied rewrites51.4%
if -3.20000000000000017e33 < z < 5.2000000000000001e-158Initial program 76.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.6
Applied rewrites38.6%
Taylor expanded in z around 0
Applied rewrites36.3%
if 2.49999999999999999e-56 < z < 1.3000000000000001e77Initial program 68.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.1
Applied rewrites49.1%
Taylor expanded in z around 0
Applied rewrites43.0%
if 1.3000000000000001e77 < z Initial program 66.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-*.f6472.0
Applied rewrites72.0%
Taylor expanded in x around 0
Applied rewrites50.6%
Final simplification43.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -2.25e+175)
(* (* z y) x)
(if (<= z 5.2e-158)
(* (* i t) b)
(if (<= z 2.6e-56)
(* (* (- y) i) j)
(if (<= z 1.3e+77) (* (* a j) c) (* (* (- b) c) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -2.25e+175) {
tmp = (z * y) * x;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 2.6e-56) {
tmp = (-y * i) * j;
} else if (z <= 1.3e+77) {
tmp = (a * j) * c;
} else {
tmp = (-b * c) * 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 (z <= (-2.25d+175)) then
tmp = (z * y) * x
else if (z <= 5.2d-158) then
tmp = (i * t) * b
else if (z <= 2.6d-56) then
tmp = (-y * i) * j
else if (z <= 1.3d+77) then
tmp = (a * j) * c
else
tmp = (-b * c) * 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 (z <= -2.25e+175) {
tmp = (z * y) * x;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 2.6e-56) {
tmp = (-y * i) * j;
} else if (z <= 1.3e+77) {
tmp = (a * j) * c;
} else {
tmp = (-b * c) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -2.25e+175: tmp = (z * y) * x elif z <= 5.2e-158: tmp = (i * t) * b elif z <= 2.6e-56: tmp = (-y * i) * j elif z <= 1.3e+77: tmp = (a * j) * c else: tmp = (-b * c) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -2.25e+175) tmp = Float64(Float64(z * y) * x); elseif (z <= 5.2e-158) tmp = Float64(Float64(i * t) * b); elseif (z <= 2.6e-56) tmp = Float64(Float64(Float64(-y) * i) * j); elseif (z <= 1.3e+77) tmp = Float64(Float64(a * j) * c); else tmp = Float64(Float64(Float64(-b) * c) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -2.25e+175) tmp = (z * y) * x; elseif (z <= 5.2e-158) tmp = (i * t) * b; elseif (z <= 2.6e-56) tmp = (-y * i) * j; elseif (z <= 1.3e+77) tmp = (a * j) * c; else tmp = (-b * c) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -2.25e+175], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 5.2e-158], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 2.6e-56], N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 1.3e+77], N[(N[(a * j), $MachinePrecision] * c), $MachinePrecision], N[(N[((-b) * c), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+175}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-158}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-56}:\\
\;\;\;\;\left(\left(-y\right) \cdot i\right) \cdot j\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+77}:\\
\;\;\;\;\left(a \cdot j\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-b\right) \cdot c\right) \cdot z\\
\end{array}
\end{array}
if z < -2.24999999999999995e175Initial program 67.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-*.f6482.5
Applied rewrites82.5%
Taylor expanded in x around inf
Applied rewrites52.7%
if -2.24999999999999995e175 < z < 5.2000000000000001e-158Initial program 75.0%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
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-*.f6437.8
Applied rewrites37.8%
Taylor expanded in z around 0
Applied rewrites32.7%
if 5.2000000000000001e-158 < z < 2.59999999999999997e-56Initial program 74.7%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/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 rewrites66.3%
Taylor expanded in j around inf
Applied rewrites45.0%
Applied rewrites45.1%
if 2.59999999999999997e-56 < z < 1.3000000000000001e77Initial program 68.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.1
Applied rewrites49.1%
Taylor expanded in z around 0
Applied rewrites43.0%
if 1.3000000000000001e77 < z Initial program 66.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-*.f6472.0
Applied rewrites72.0%
Taylor expanded in x around 0
Applied rewrites50.6%
Final simplification41.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- c) b (* y x)) z)))
(if (<= z -2.1e+118)
t_1
(if (<= z -1.02e+35)
(* (fma (- i) j (* z x)) y)
(if (<= z 1.5e+139) (* (fma (- x) a (* i b)) t) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-c, b, (y * x)) * z;
double tmp;
if (z <= -2.1e+118) {
tmp = t_1;
} else if (z <= -1.02e+35) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= 1.5e+139) {
tmp = fma(-x, a, (i * b)) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-c), b, Float64(y * x)) * z) tmp = 0.0 if (z <= -2.1e+118) tmp = t_1; elseif (z <= -1.02e+35) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= 1.5e+139) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -2.1e+118], t$95$1, If[LessEqual[z, -1.02e+35], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.5e+139], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.02 \cdot 10^{+35}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+139}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1e118 or 1.5e139 < z Initial program 70.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-*.f6479.3
Applied rewrites79.3%
if -2.1e118 < z < -1.02000000000000007e35Initial program 71.0%
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-*.f6465.9
Applied rewrites65.9%
if -1.02000000000000007e35 < z < 1.5e139Initial program 72.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.7
Applied rewrites50.7%
Final simplification61.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) y (* c a)) j)))
(if (<= j -4.1e+155)
t_1
(if (<= j 1.25e-18)
(* (fma (- a) t (* z y)) x)
(if (<= j 1.55e+77) (* (fma (- c) b (* y x)) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, y, (c * a)) * j;
double tmp;
if (j <= -4.1e+155) {
tmp = t_1;
} else if (j <= 1.25e-18) {
tmp = fma(-a, t, (z * y)) * x;
} else if (j <= 1.55e+77) {
tmp = fma(-c, b, (y * x)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), y, Float64(c * a)) * j) tmp = 0.0 if (j <= -4.1e+155) tmp = t_1; elseif (j <= 1.25e-18) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); elseif (j <= 1.55e+77) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -4.1e+155], t$95$1, If[LessEqual[j, 1.25e-18], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[j, 1.55e+77], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{if}\;j \leq -4.1 \cdot 10^{+155}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.25 \cdot 10^{-18}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{elif}\;j \leq 1.55 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -4.0999999999999998e155 or 1.54999999999999999e77 < j Initial program 64.1%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites77.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
*-commutativeN/A
lower-*.f6466.3
Applied rewrites66.3%
if -4.0999999999999998e155 < j < 1.25000000000000009e-18Initial program 74.4%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites74.3%
Taylor expanded in x 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
*-commutativeN/A
lower-*.f6451.0
Applied rewrites51.0%
if 1.25000000000000009e-18 < j < 1.54999999999999999e77Initial program 81.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.4
Applied rewrites59.4%
Final simplification56.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* j c) a)))
(if (<= c -6e+128)
t_1
(if (<= c -4.8e-57)
(* (* x z) y)
(if (<= c 3.3e-263)
(* (* (- t) a) x)
(if (<= c 3.8e+18) (* (* z y) x) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * c) * a;
double tmp;
if (c <= -6e+128) {
tmp = t_1;
} else if (c <= -4.8e-57) {
tmp = (x * z) * y;
} else if (c <= 3.3e-263) {
tmp = (-t * a) * x;
} else if (c <= 3.8e+18) {
tmp = (z * y) * x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (j * c) * a
if (c <= (-6d+128)) then
tmp = t_1
else if (c <= (-4.8d-57)) then
tmp = (x * z) * y
else if (c <= 3.3d-263) then
tmp = (-t * a) * x
else if (c <= 3.8d+18) then
tmp = (z * y) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * c) * a;
double tmp;
if (c <= -6e+128) {
tmp = t_1;
} else if (c <= -4.8e-57) {
tmp = (x * z) * y;
} else if (c <= 3.3e-263) {
tmp = (-t * a) * x;
} else if (c <= 3.8e+18) {
tmp = (z * y) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * c) * a tmp = 0 if c <= -6e+128: tmp = t_1 elif c <= -4.8e-57: tmp = (x * z) * y elif c <= 3.3e-263: tmp = (-t * a) * x elif c <= 3.8e+18: tmp = (z * y) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * c) * a) tmp = 0.0 if (c <= -6e+128) tmp = t_1; elseif (c <= -4.8e-57) tmp = Float64(Float64(x * z) * y); elseif (c <= 3.3e-263) tmp = Float64(Float64(Float64(-t) * a) * x); elseif (c <= 3.8e+18) tmp = Float64(Float64(z * y) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * c) * a; tmp = 0.0; if (c <= -6e+128) tmp = t_1; elseif (c <= -4.8e-57) tmp = (x * z) * y; elseif (c <= 3.3e-263) tmp = (-t * a) * x; elseif (c <= 3.8e+18) tmp = (z * y) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[c, -6e+128], t$95$1, If[LessEqual[c, -4.8e-57], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[c, 3.3e-263], N[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[c, 3.8e+18], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot a\\
\mathbf{if}\;c \leq -6 \cdot 10^{+128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -4.8 \cdot 10^{-57}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;c \leq 3.3 \cdot 10^{-263}:\\
\;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\
\mathbf{elif}\;c \leq 3.8 \cdot 10^{+18}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.9999999999999997e128 or 3.8e18 < c Initial program 62.1%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.1
Applied rewrites50.1%
Taylor expanded in x around 0
Applied rewrites43.0%
if -5.9999999999999997e128 < c < -4.80000000000000012e-57Initial program 65.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites65.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in x around inf
Applied rewrites46.0%
if -4.80000000000000012e-57 < c < 3.2999999999999997e-263Initial program 73.2%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites84.7%
Taylor expanded in x 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
*-commutativeN/A
lower-*.f6447.4
Applied rewrites47.4%
Taylor expanded in y around 0
Applied rewrites38.2%
if 3.2999999999999997e-263 < c < 3.8e18Initial program 85.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-*.f6447.5
Applied rewrites47.5%
Taylor expanded in x around inf
Applied rewrites34.5%
Final simplification40.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -2.25e+175)
(* (* z y) x)
(if (<= z 5.2e-158)
(* (* i t) b)
(if (<= z 2.6e-56)
(* (* (- y) i) j)
(if (<= z 4.5e+202) (* (* a j) c) (* (* x z) 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 <= -2.25e+175) {
tmp = (z * y) * x;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 2.6e-56) {
tmp = (-y * i) * j;
} else if (z <= 4.5e+202) {
tmp = (a * j) * c;
} else {
tmp = (x * z) * 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 <= (-2.25d+175)) then
tmp = (z * y) * x
else if (z <= 5.2d-158) then
tmp = (i * t) * b
else if (z <= 2.6d-56) then
tmp = (-y * i) * j
else if (z <= 4.5d+202) then
tmp = (a * j) * c
else
tmp = (x * z) * 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 <= -2.25e+175) {
tmp = (z * y) * x;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 2.6e-56) {
tmp = (-y * i) * j;
} else if (z <= 4.5e+202) {
tmp = (a * j) * c;
} else {
tmp = (x * z) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -2.25e+175: tmp = (z * y) * x elif z <= 5.2e-158: tmp = (i * t) * b elif z <= 2.6e-56: tmp = (-y * i) * j elif z <= 4.5e+202: tmp = (a * j) * c else: tmp = (x * z) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -2.25e+175) tmp = Float64(Float64(z * y) * x); elseif (z <= 5.2e-158) tmp = Float64(Float64(i * t) * b); elseif (z <= 2.6e-56) tmp = Float64(Float64(Float64(-y) * i) * j); elseif (z <= 4.5e+202) tmp = Float64(Float64(a * j) * c); else tmp = Float64(Float64(x * z) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -2.25e+175) tmp = (z * y) * x; elseif (z <= 5.2e-158) tmp = (i * t) * b; elseif (z <= 2.6e-56) tmp = (-y * i) * j; elseif (z <= 4.5e+202) tmp = (a * j) * c; else tmp = (x * z) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -2.25e+175], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 5.2e-158], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 2.6e-56], N[(N[((-y) * i), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 4.5e+202], N[(N[(a * j), $MachinePrecision] * c), $MachinePrecision], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+175}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-158}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-56}:\\
\;\;\;\;\left(\left(-y\right) \cdot i\right) \cdot j\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+202}:\\
\;\;\;\;\left(a \cdot j\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\end{array}
\end{array}
if z < -2.24999999999999995e175Initial program 67.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-*.f6482.5
Applied rewrites82.5%
Taylor expanded in x around inf
Applied rewrites52.7%
if -2.24999999999999995e175 < z < 5.2000000000000001e-158Initial program 75.0%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
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-*.f6437.8
Applied rewrites37.8%
Taylor expanded in z around 0
Applied rewrites32.7%
if 5.2000000000000001e-158 < z < 2.59999999999999997e-56Initial program 74.7%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/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 rewrites66.3%
Taylor expanded in j around inf
Applied rewrites45.0%
Applied rewrites45.1%
if 2.59999999999999997e-56 < z < 4.49999999999999978e202Initial program 65.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in z around 0
Applied rewrites35.0%
if 4.49999999999999978e202 < z Initial program 69.4%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites84.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6462.5
Applied rewrites62.5%
Taylor expanded in x around inf
Applied rewrites58.7%
Final simplification39.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -2.25e+175)
(* (* z y) x)
(if (<= z 5.2e-158)
(* (* i t) b)
(if (<= z 2.5e-56)
(* (- i) (* j y))
(if (<= z 4.5e+202) (* (* a j) c) (* (* x z) 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 <= -2.25e+175) {
tmp = (z * y) * x;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 2.5e-56) {
tmp = -i * (j * y);
} else if (z <= 4.5e+202) {
tmp = (a * j) * c;
} else {
tmp = (x * z) * 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 <= (-2.25d+175)) then
tmp = (z * y) * x
else if (z <= 5.2d-158) then
tmp = (i * t) * b
else if (z <= 2.5d-56) then
tmp = -i * (j * y)
else if (z <= 4.5d+202) then
tmp = (a * j) * c
else
tmp = (x * z) * 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 <= -2.25e+175) {
tmp = (z * y) * x;
} else if (z <= 5.2e-158) {
tmp = (i * t) * b;
} else if (z <= 2.5e-56) {
tmp = -i * (j * y);
} else if (z <= 4.5e+202) {
tmp = (a * j) * c;
} else {
tmp = (x * z) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -2.25e+175: tmp = (z * y) * x elif z <= 5.2e-158: tmp = (i * t) * b elif z <= 2.5e-56: tmp = -i * (j * y) elif z <= 4.5e+202: tmp = (a * j) * c else: tmp = (x * z) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -2.25e+175) tmp = Float64(Float64(z * y) * x); elseif (z <= 5.2e-158) tmp = Float64(Float64(i * t) * b); elseif (z <= 2.5e-56) tmp = Float64(Float64(-i) * Float64(j * y)); elseif (z <= 4.5e+202) tmp = Float64(Float64(a * j) * c); else tmp = Float64(Float64(x * z) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -2.25e+175) tmp = (z * y) * x; elseif (z <= 5.2e-158) tmp = (i * t) * b; elseif (z <= 2.5e-56) tmp = -i * (j * y); elseif (z <= 4.5e+202) tmp = (a * j) * c; else tmp = (x * z) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -2.25e+175], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 5.2e-158], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[z, 2.5e-56], N[((-i) * N[(j * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+202], N[(N[(a * j), $MachinePrecision] * c), $MachinePrecision], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+175}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-158}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-56}:\\
\;\;\;\;\left(-i\right) \cdot \left(j \cdot y\right)\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+202}:\\
\;\;\;\;\left(a \cdot j\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\end{array}
\end{array}
if z < -2.24999999999999995e175Initial program 67.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-*.f6482.5
Applied rewrites82.5%
Taylor expanded in x around inf
Applied rewrites52.7%
if -2.24999999999999995e175 < z < 5.2000000000000001e-158Initial program 75.0%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
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-*.f6437.8
Applied rewrites37.8%
Taylor expanded in z around 0
Applied rewrites32.7%
if 5.2000000000000001e-158 < z < 2.49999999999999999e-56Initial program 74.7%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/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 rewrites66.3%
Taylor expanded in j around inf
Applied rewrites45.0%
if 2.49999999999999999e-56 < z < 4.49999999999999978e202Initial program 65.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.1
Applied rewrites52.1%
Taylor expanded in z around 0
Applied rewrites35.0%
if 4.49999999999999978e202 < z Initial program 69.4%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites84.5%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6462.5
Applied rewrites62.5%
Taylor expanded in x around inf
Applied rewrites58.7%
Final simplification39.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= j -1.15e+156) (* (* a j) c) (if (<= j 2.1e+159) (* (fma (- a) t (* z y)) x) (* (* (- j) i) y))))
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.15e+156) {
tmp = (a * j) * c;
} else if (j <= 2.1e+159) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = (-j * i) * y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -1.15e+156) tmp = Float64(Float64(a * j) * c); elseif (j <= 2.1e+159) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); else tmp = Float64(Float64(Float64(-j) * i) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -1.15e+156], N[(N[(a * j), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[j, 2.1e+159], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[((-j) * i), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.15 \cdot 10^{+156}:\\
\;\;\;\;\left(a \cdot j\right) \cdot c\\
\mathbf{elif}\;j \leq 2.1 \cdot 10^{+159}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-j\right) \cdot i\right) \cdot y\\
\end{array}
\end{array}
if j < -1.1499999999999999e156Initial program 67.8%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.6
Applied rewrites61.6%
Taylor expanded in z around 0
Applied rewrites54.5%
if -1.1499999999999999e156 < j < 2.09999999999999989e159Initial program 73.6%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites74.6%
Taylor expanded in x 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
*-commutativeN/A
lower-*.f6447.0
Applied rewrites47.0%
if 2.09999999999999989e159 < j Initial program 62.3%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites78.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.4
Applied rewrites49.4%
Taylor expanded in x around 0
Applied rewrites52.3%
Final simplification48.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* a j) c)))
(if (<= j -7.5e+126)
t_1
(if (<= j 10.0) (* (* x z) y) (if (<= j 1.05e+144) (* (* i t) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (a * j) * c;
double tmp;
if (j <= -7.5e+126) {
tmp = t_1;
} else if (j <= 10.0) {
tmp = (x * z) * y;
} else if (j <= 1.05e+144) {
tmp = (i * t) * b;
} 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 = (a * j) * c
if (j <= (-7.5d+126)) then
tmp = t_1
else if (j <= 10.0d0) then
tmp = (x * z) * y
else if (j <= 1.05d+144) then
tmp = (i * t) * b
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 = (a * j) * c;
double tmp;
if (j <= -7.5e+126) {
tmp = t_1;
} else if (j <= 10.0) {
tmp = (x * z) * y;
} else if (j <= 1.05e+144) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (a * j) * c tmp = 0 if j <= -7.5e+126: tmp = t_1 elif j <= 10.0: tmp = (x * z) * y elif j <= 1.05e+144: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(a * j) * c) tmp = 0.0 if (j <= -7.5e+126) tmp = t_1; elseif (j <= 10.0) tmp = Float64(Float64(x * z) * y); elseif (j <= 1.05e+144) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (a * j) * c; tmp = 0.0; if (j <= -7.5e+126) tmp = t_1; elseif (j <= 10.0) tmp = (x * z) * y; elseif (j <= 1.05e+144) tmp = (i * t) * b; 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[(a * j), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[j, -7.5e+126], t$95$1, If[LessEqual[j, 10.0], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[j, 1.05e+144], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot j\right) \cdot c\\
\mathbf{if}\;j \leq -7.5 \cdot 10^{+126}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 10:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\mathbf{elif}\;j \leq 1.05 \cdot 10^{+144}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -7.5000000000000006e126 or 1.04999999999999998e144 < j Initial program 65.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.6
Applied rewrites55.6%
Taylor expanded in z around 0
Applied rewrites47.4%
if -7.5000000000000006e126 < j < 10Initial program 74.7%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites73.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.0
Applied rewrites38.0%
Taylor expanded in x around inf
Applied rewrites32.3%
if 10 < j < 1.04999999999999998e144Initial program 70.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-*.f6453.0
Applied rewrites53.0%
Taylor expanded in z around 0
Applied rewrites38.2%
Final simplification37.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= j -7.5e+126) (not (<= j 3.6e+141))) (* (* a j) c) (* (* x z) y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((j <= -7.5e+126) || !(j <= 3.6e+141)) {
tmp = (a * j) * c;
} else {
tmp = (x * z) * 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 ((j <= (-7.5d+126)) .or. (.not. (j <= 3.6d+141))) then
tmp = (a * j) * c
else
tmp = (x * z) * 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 ((j <= -7.5e+126) || !(j <= 3.6e+141)) {
tmp = (a * j) * c;
} else {
tmp = (x * z) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (j <= -7.5e+126) or not (j <= 3.6e+141): tmp = (a * j) * c else: tmp = (x * z) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((j <= -7.5e+126) || !(j <= 3.6e+141)) tmp = Float64(Float64(a * j) * c); else tmp = Float64(Float64(x * z) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((j <= -7.5e+126) || ~((j <= 3.6e+141))) tmp = (a * j) * c; else tmp = (x * z) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[j, -7.5e+126], N[Not[LessEqual[j, 3.6e+141]], $MachinePrecision]], N[(N[(a * j), $MachinePrecision] * c), $MachinePrecision], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -7.5 \cdot 10^{+126} \lor \neg \left(j \leq 3.6 \cdot 10^{+141}\right):\\
\;\;\;\;\left(a \cdot j\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\end{array}
\end{array}
if j < -7.5000000000000006e126 or 3.6000000000000001e141 < j Initial program 64.2%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.9
Applied rewrites54.9%
Taylor expanded in z around 0
Applied rewrites46.8%
if -7.5000000000000006e126 < j < 3.6000000000000001e141Initial program 74.5%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites73.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6436.4
Applied rewrites36.4%
Taylor expanded in x around inf
Applied rewrites29.8%
Final simplification35.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= y -2.85e+115) (* (* z y) x) (if (<= y 15500000000000.0) (* (* j c) a) (* (* x z) 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 <= -2.85e+115) {
tmp = (z * y) * x;
} else if (y <= 15500000000000.0) {
tmp = (j * c) * a;
} else {
tmp = (x * z) * 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 (y <= (-2.85d+115)) then
tmp = (z * y) * x
else if (y <= 15500000000000.0d0) then
tmp = (j * c) * a
else
tmp = (x * z) * 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 (y <= -2.85e+115) {
tmp = (z * y) * x;
} else if (y <= 15500000000000.0) {
tmp = (j * c) * a;
} else {
tmp = (x * z) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if y <= -2.85e+115: tmp = (z * y) * x elif y <= 15500000000000.0: tmp = (j * c) * a else: tmp = (x * z) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (y <= -2.85e+115) tmp = Float64(Float64(z * y) * x); elseif (y <= 15500000000000.0) tmp = Float64(Float64(j * c) * a); else tmp = Float64(Float64(x * z) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (y <= -2.85e+115) tmp = (z * y) * x; elseif (y <= 15500000000000.0) tmp = (j * c) * a; else tmp = (x * z) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[y, -2.85e+115], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[y, 15500000000000.0], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.85 \cdot 10^{+115}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;y \leq 15500000000000:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot z\right) \cdot y\\
\end{array}
\end{array}
if y < -2.84999999999999983e115Initial program 57.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-*.f6444.6
Applied rewrites44.6%
Taylor expanded in x around inf
Applied rewrites42.4%
if -2.84999999999999983e115 < y < 1.55e13Initial program 77.3%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.7
Applied rewrites46.7%
Taylor expanded in x around 0
Applied rewrites28.4%
if 1.55e13 < y Initial program 64.2%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites73.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.8
Applied rewrites64.8%
Taylor expanded in x around inf
Applied rewrites48.1%
Final simplification34.7%
(FPCore (x y z t a b c i j) :precision binary64 (* (* x z) y))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (x * z) * 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 * z) * 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 * z) * y;
}
def code(x, y, z, t, a, b, c, i, j): return (x * z) * y
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(x * z) * y) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (x * z) * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(x * z), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot z\right) \cdot y
\end{array}
Initial program 71.4%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
Applied rewrites76.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.7
Applied rewrites39.7%
Taylor expanded in x around inf
Applied rewrites24.0%
Final simplification24.0%
(FPCore (x y z t a b c i j) :precision binary64 (* (* z y) x))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * y) * x;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (z * y) * x
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * y) * x;
}
def code(x, y, z, t, a, b, c, i, j): return (z * y) * x
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(z * y) * x) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (z * y) * x; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot y\right) \cdot x
\end{array}
Initial program 71.4%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.7
Applied rewrites38.7%
Taylor expanded in x around inf
Applied rewrites23.3%
Final simplification23.3%
(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 2024324
(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)))))