
(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 23 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 (<=
(-
(* (- (* c a) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i t) (* c z)) b)))
INFINITY)
(fma
(fma (- i) y (* c a))
j
(fma (- b) (fma (- i) t (* c z)) (* (fma (- a) t (* z y)) x)))
(* (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 (((((c * a) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * t) - (c * z)) * b))) <= ((double) INFINITY)) {
tmp = fma(fma(-i, y, (c * a)), j, fma(-b, fma(-i, t, (c * z)), (fma(-a, t, (z * y)) * x)));
} 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 (Float64(Float64(Float64(Float64(c * a) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * t) - Float64(c * z)) * b))) <= Inf) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(Float64(-b), fma(Float64(-i), t, Float64(c * z)), Float64(fma(Float64(-a), t, Float64(z * y)) * x))); 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[N[(N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[((-b) * N[((-i) * t + N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(c \cdot a - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot t - c \cdot z\right) \cdot b\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-b, \mathsf{fma}\left(-i, t, c \cdot z\right), \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\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 90.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6490.8
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6490.8
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites90.8%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.3
Applied rewrites55.3%
Final simplification82.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- i) y (* c a)) j (* (fma (- t) a (* z y)) x))))
(if (<= j -4.3e+30)
t_1
(if (<= j 4.7e+79)
(-
(* (* j c) a)
(- (* (- (* a t) (* z y)) x) (* (- (* i t) (* c z)) b)))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(fma(-i, y, (c * a)), j, (fma(-t, a, (z * y)) * x));
double tmp;
if (j <= -4.3e+30) {
tmp = t_1;
} else if (j <= 4.7e+79) {
tmp = ((j * c) * a) - ((((a * t) - (z * y)) * x) - (((i * t) - (c * z)) * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(fma(Float64(-t), a, Float64(z * y)) * x)) tmp = 0.0 if (j <= -4.3e+30) tmp = t_1; elseif (j <= 4.7e+79) tmp = Float64(Float64(Float64(j * c) * a) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * t) - Float64(c * z)) * b))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.3e+30], t$95$1, If[LessEqual[j, 4.7e+79], N[(N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\mathbf{if}\;j \leq -4.3 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 4.7 \cdot 10^{+79}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot t - c \cdot z\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -4.3e30 or 4.70000000000000023e79 < j Initial program 67.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6471.4
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6473.3
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites77.1%
Taylor expanded in x around inf
*-commutativeN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6478.4
Applied rewrites78.4%
if -4.3e30 < j < 4.70000000000000023e79Initial program 72.1%
Taylor expanded in y around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6477.1
Applied rewrites77.1%
Final simplification77.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- z) c (* i t)) b)))
(if (<= b -1.3e+53)
t_1
(if (<= b -4e-45)
(- (* (* (- t) a) x) (* (- (* i y) (* c a)) j))
(if (<= b 5.3e+129) (+ (* (* z x) y) (* (- (* c a) (* i y)) j)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-z, c, (i * t)) * b;
double tmp;
if (b <= -1.3e+53) {
tmp = t_1;
} else if (b <= -4e-45) {
tmp = ((-t * a) * x) - (((i * y) - (c * a)) * j);
} else if (b <= 5.3e+129) {
tmp = ((z * x) * y) + (((c * a) - (i * y)) * j);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-z), c, Float64(i * t)) * b) tmp = 0.0 if (b <= -1.3e+53) tmp = t_1; elseif (b <= -4e-45) tmp = Float64(Float64(Float64(Float64(-t) * a) * x) - Float64(Float64(Float64(i * y) - Float64(c * a)) * j)); elseif (b <= 5.3e+129) tmp = Float64(Float64(Float64(z * x) * y) + Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.3e+53], t$95$1, If[LessEqual[b, -4e-45], N[(N[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * y), $MachinePrecision] - N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.3e+129], N[(N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision] + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4 \cdot 10^{-45}:\\
\;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x - \left(i \cdot y - c \cdot a\right) \cdot j\\
\mathbf{elif}\;b \leq 5.3 \cdot 10^{+129}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y + \left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.29999999999999999e53 or 5.2999999999999999e129 < b Initial program 62.6%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6467.1
Applied rewrites67.1%
if -1.29999999999999999e53 < b < -3.99999999999999994e-45Initial program 80.9%
Taylor expanded in a around inf
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6473.3
Applied rewrites73.3%
if -3.99999999999999994e-45 < b < 5.2999999999999999e129Initial program 73.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6465.1
Applied rewrites65.1%
Final simplification66.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- z) c (* i t)) b)))
(if (<= b -5.3e+53)
t_1
(if (<= b 2.4e+131)
(fma (fma (- i) y (* c a)) j (* (fma (- t) a (* z y)) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-z, c, (i * t)) * b;
double tmp;
if (b <= -5.3e+53) {
tmp = t_1;
} else if (b <= 2.4e+131) {
tmp = fma(fma(-i, y, (c * a)), j, (fma(-t, a, (z * y)) * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-z), c, Float64(i * t)) * b) tmp = 0.0 if (b <= -5.3e+53) tmp = t_1; elseif (b <= 2.4e+131) tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, Float64(fma(Float64(-t), a, Float64(z * y)) * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -5.3e+53], t$95$1, If[LessEqual[b, 2.4e+131], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -5.3 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+131}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.3000000000000002e53 or 2.3999999999999999e131 < b Initial program 62.6%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6467.1
Applied rewrites67.1%
if -5.3000000000000002e53 < b < 2.3999999999999999e131Initial program 74.0%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6475.2
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6476.4
lift--.f64N/A
sub-negN/A
+-commutativeN/A
Applied rewrites78.1%
Taylor expanded in x around inf
*-commutativeN/A
+-commutativeN/A
mul-1-negN/A
sub-negN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6474.8
Applied rewrites74.8%
Final simplification72.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- z) c (* i t)) b)))
(if (<= b -1.65e+53)
t_1
(if (<= b 2.4e+131)
(fma (fma (- t) a (* z y)) x (* (fma (- i) y (* c a)) j))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-z, c, (i * t)) * b;
double tmp;
if (b <= -1.65e+53) {
tmp = t_1;
} else if (b <= 2.4e+131) {
tmp = fma(fma(-t, a, (z * y)), x, (fma(-i, y, (c * a)) * j));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-z), c, Float64(i * t)) * b) tmp = 0.0 if (b <= -1.65e+53) tmp = t_1; elseif (b <= 2.4e+131) tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, Float64(fma(Float64(-i), y, Float64(c * a)) * j)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.65e+53], t$95$1, If[LessEqual[b, 2.4e+131], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -1.65 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+131}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.6500000000000001e53 or 2.3999999999999999e131 < b Initial program 62.6%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6467.1
Applied rewrites67.1%
if -1.6500000000000001e53 < b < 2.3999999999999999e131Initial program 74.0%
Taylor expanded in b around 0
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6473.6
Applied rewrites73.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= z -2.5e+113)
t_1
(if (<= z -5.5e-178)
(* (* j a) c)
(if (<= z -1.28e-250)
(* (* (- t) a) x)
(if (<= z 6.8e-207)
(* (* j c) a)
(if (<= z 1.8e-25)
(* (* i b) t)
(if (<= z 6.5e+108) t_1 (* (* (- c) z) b)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -2.5e+113) {
tmp = t_1;
} else if (z <= -5.5e-178) {
tmp = (j * a) * c;
} else if (z <= -1.28e-250) {
tmp = (-t * a) * x;
} else if (z <= 6.8e-207) {
tmp = (j * c) * a;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else if (z <= 6.5e+108) {
tmp = t_1;
} else {
tmp = (-c * z) * b;
}
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 = (z * x) * y
if (z <= (-2.5d+113)) then
tmp = t_1
else if (z <= (-5.5d-178)) then
tmp = (j * a) * c
else if (z <= (-1.28d-250)) then
tmp = (-t * a) * x
else if (z <= 6.8d-207) then
tmp = (j * c) * a
else if (z <= 1.8d-25) then
tmp = (i * b) * t
else if (z <= 6.5d+108) then
tmp = t_1
else
tmp = (-c * z) * b
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 = (z * x) * y;
double tmp;
if (z <= -2.5e+113) {
tmp = t_1;
} else if (z <= -5.5e-178) {
tmp = (j * a) * c;
} else if (z <= -1.28e-250) {
tmp = (-t * a) * x;
} else if (z <= 6.8e-207) {
tmp = (j * c) * a;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else if (z <= 6.5e+108) {
tmp = t_1;
} else {
tmp = (-c * z) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -2.5e+113: tmp = t_1 elif z <= -5.5e-178: tmp = (j * a) * c elif z <= -1.28e-250: tmp = (-t * a) * x elif z <= 6.8e-207: tmp = (j * c) * a elif z <= 1.8e-25: tmp = (i * b) * t elif z <= 6.5e+108: tmp = t_1 else: tmp = (-c * z) * b return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -2.5e+113) tmp = t_1; elseif (z <= -5.5e-178) tmp = Float64(Float64(j * a) * c); elseif (z <= -1.28e-250) tmp = Float64(Float64(Float64(-t) * a) * x); elseif (z <= 6.8e-207) tmp = Float64(Float64(j * c) * a); elseif (z <= 1.8e-25) tmp = Float64(Float64(i * b) * t); elseif (z <= 6.5e+108) tmp = t_1; else tmp = Float64(Float64(Float64(-c) * z) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (z <= -2.5e+113) tmp = t_1; elseif (z <= -5.5e-178) tmp = (j * a) * c; elseif (z <= -1.28e-250) tmp = (-t * a) * x; elseif (z <= 6.8e-207) tmp = (j * c) * a; elseif (z <= 1.8e-25) tmp = (i * b) * t; elseif (z <= 6.5e+108) tmp = t_1; else tmp = (-c * z) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -2.5e+113], t$95$1, If[LessEqual[z, -5.5e-178], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, -1.28e-250], N[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 6.8e-207], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 1.8e-25], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 6.5e+108], t$95$1, N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-178}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;z \leq -1.28 \cdot 10^{-250}:\\
\;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-25}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\end{array}
\end{array}
if z < -2.5e113 or 1.8e-25 < z < 6.4999999999999996e108Initial program 63.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.4
Applied rewrites56.4%
Taylor expanded in x around inf
Applied rewrites47.9%
Applied rewrites50.8%
if -2.5e113 < z < -5.50000000000000028e-178Initial program 74.4%
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-*.f6444.4
Applied rewrites44.4%
Taylor expanded in z around 0
Applied rewrites29.8%
if -5.50000000000000028e-178 < z < -1.27999999999999993e-250Initial program 62.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.1
Applied rewrites63.1%
Taylor expanded in y around 0
Applied rewrites63.1%
if -1.27999999999999993e-250 < z < 6.79999999999999997e-207Initial program 83.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-*.f6437.9
Applied rewrites37.9%
Taylor expanded in z around 0
Applied rewrites37.4%
if 6.79999999999999997e-207 < z < 1.8e-25Initial program 78.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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites40.2%
if 6.4999999999999996e108 < z Initial program 58.7%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6461.9
Applied rewrites61.9%
Taylor expanded in z around inf
Applied rewrites54.5%
Final simplification43.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= z -2.5e+113)
t_1
(if (<= z -5.5e-178)
(* (* j a) c)
(if (<= z -1.28e-250)
(* (* (- t) a) x)
(if (<= z 6.8e-207)
(* (* j c) a)
(if (<= z 1.8e-25)
(* (* i b) t)
(if (<= z 1.2e+111) t_1 (* (* (- c) b) z)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -2.5e+113) {
tmp = t_1;
} else if (z <= -5.5e-178) {
tmp = (j * a) * c;
} else if (z <= -1.28e-250) {
tmp = (-t * a) * x;
} else if (z <= 6.8e-207) {
tmp = (j * c) * a;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else if (z <= 1.2e+111) {
tmp = t_1;
} else {
tmp = (-c * b) * 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 = (z * x) * y
if (z <= (-2.5d+113)) then
tmp = t_1
else if (z <= (-5.5d-178)) then
tmp = (j * a) * c
else if (z <= (-1.28d-250)) then
tmp = (-t * a) * x
else if (z <= 6.8d-207) then
tmp = (j * c) * a
else if (z <= 1.8d-25) then
tmp = (i * b) * t
else if (z <= 1.2d+111) then
tmp = t_1
else
tmp = (-c * b) * 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 = (z * x) * y;
double tmp;
if (z <= -2.5e+113) {
tmp = t_1;
} else if (z <= -5.5e-178) {
tmp = (j * a) * c;
} else if (z <= -1.28e-250) {
tmp = (-t * a) * x;
} else if (z <= 6.8e-207) {
tmp = (j * c) * a;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else if (z <= 1.2e+111) {
tmp = t_1;
} else {
tmp = (-c * b) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -2.5e+113: tmp = t_1 elif z <= -5.5e-178: tmp = (j * a) * c elif z <= -1.28e-250: tmp = (-t * a) * x elif z <= 6.8e-207: tmp = (j * c) * a elif z <= 1.8e-25: tmp = (i * b) * t elif z <= 1.2e+111: tmp = t_1 else: tmp = (-c * b) * z return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -2.5e+113) tmp = t_1; elseif (z <= -5.5e-178) tmp = Float64(Float64(j * a) * c); elseif (z <= -1.28e-250) tmp = Float64(Float64(Float64(-t) * a) * x); elseif (z <= 6.8e-207) tmp = Float64(Float64(j * c) * a); elseif (z <= 1.8e-25) tmp = Float64(Float64(i * b) * t); elseif (z <= 1.2e+111) tmp = t_1; else tmp = Float64(Float64(Float64(-c) * b) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (z <= -2.5e+113) tmp = t_1; elseif (z <= -5.5e-178) tmp = (j * a) * c; elseif (z <= -1.28e-250) tmp = (-t * a) * x; elseif (z <= 6.8e-207) tmp = (j * c) * a; elseif (z <= 1.8e-25) tmp = (i * b) * t; elseif (z <= 1.2e+111) tmp = t_1; else tmp = (-c * b) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -2.5e+113], t$95$1, If[LessEqual[z, -5.5e-178], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, -1.28e-250], N[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 6.8e-207], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 1.8e-25], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.2e+111], t$95$1, N[(N[((-c) * b), $MachinePrecision] * z), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-178}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;z \leq -1.28 \cdot 10^{-250}:\\
\;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-25}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\
\end{array}
\end{array}
if z < -2.5e113 or 1.8e-25 < z < 1.20000000000000003e111Initial program 63.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.4
Applied rewrites56.4%
Taylor expanded in x around inf
Applied rewrites47.9%
Applied rewrites50.8%
if -2.5e113 < z < -5.50000000000000028e-178Initial program 74.4%
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-*.f6444.4
Applied rewrites44.4%
Taylor expanded in z around 0
Applied rewrites29.8%
if -5.50000000000000028e-178 < z < -1.27999999999999993e-250Initial program 62.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.1
Applied rewrites63.1%
Taylor expanded in y around 0
Applied rewrites63.1%
if -1.27999999999999993e-250 < z < 6.79999999999999997e-207Initial program 83.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-*.f6437.9
Applied rewrites37.9%
Taylor expanded in z around 0
Applied rewrites37.4%
if 6.79999999999999997e-207 < z < 1.8e-25Initial program 78.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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites40.2%
if 1.20000000000000003e111 < z Initial program 58.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6482.9
Applied rewrites82.9%
Taylor expanded in x around 0
Applied rewrites52.2%
Final simplification43.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- c) b (* y x)) z)))
(if (<= z -2.7e-49)
t_1
(if (<= z -5.5e-178)
(* (* j a) c)
(if (<= z -1.28e-250)
(* (* (- t) a) x)
(if (<= z 6.8e-207)
(* (* j c) a)
(if (<= z 4.1e-32) (* (* 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.7e-49) {
tmp = t_1;
} else if (z <= -5.5e-178) {
tmp = (j * a) * c;
} else if (z <= -1.28e-250) {
tmp = (-t * a) * x;
} else if (z <= 6.8e-207) {
tmp = (j * c) * a;
} else if (z <= 4.1e-32) {
tmp = (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.7e-49) tmp = t_1; elseif (z <= -5.5e-178) tmp = Float64(Float64(j * a) * c); elseif (z <= -1.28e-250) tmp = Float64(Float64(Float64(-t) * a) * x); elseif (z <= 6.8e-207) tmp = Float64(Float64(j * c) * a); elseif (z <= 4.1e-32) tmp = Float64(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.7e-49], t$95$1, If[LessEqual[z, -5.5e-178], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, -1.28e-250], N[(N[((-t) * a), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 6.8e-207], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 4.1e-32], N[(N[(i * b), $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.7 \cdot 10^{-49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-178}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;z \leq -1.28 \cdot 10^{-250}:\\
\;\;\;\;\left(\left(-t\right) \cdot a\right) \cdot x\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-32}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7e-49 or 4.09999999999999975e-32 < z Initial program 64.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6460.2
Applied rewrites60.2%
if -2.7e-49 < z < -5.50000000000000028e-178Initial program 78.5%
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-*.f6439.7
Applied rewrites39.7%
Taylor expanded in z around 0
Applied rewrites35.7%
if -5.50000000000000028e-178 < z < -1.27999999999999993e-250Initial program 62.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.1
Applied rewrites63.1%
Taylor expanded in y around 0
Applied rewrites63.1%
if -1.27999999999999993e-250 < z < 6.79999999999999997e-207Initial program 83.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-*.f6437.9
Applied rewrites37.9%
Taylor expanded in z around 0
Applied rewrites37.4%
if 6.79999999999999997e-207 < z < 4.09999999999999975e-32Initial program 78.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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites40.2%
Final simplification51.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- z) c (* i t)) b)))
(if (<= b -1.2e+49)
t_1
(if (<= b 5.3e+129) (+ (* (* z x) y) (* (- (* c a) (* i y)) j)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-z, c, (i * t)) * b;
double tmp;
if (b <= -1.2e+49) {
tmp = t_1;
} else if (b <= 5.3e+129) {
tmp = ((z * x) * y) + (((c * a) - (i * y)) * j);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-z), c, Float64(i * t)) * b) tmp = 0.0 if (b <= -1.2e+49) tmp = t_1; elseif (b <= 5.3e+129) tmp = Float64(Float64(Float64(z * x) * y) + Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -1.2e+49], t$95$1, If[LessEqual[b, 5.3e+129], N[(N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision] + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{if}\;b \leq -1.2 \cdot 10^{+49}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 5.3 \cdot 10^{+129}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y + \left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.2e49 or 5.2999999999999999e129 < b Initial program 63.1%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6466.4
Applied rewrites66.4%
if -1.2e49 < b < 5.2999999999999999e129Initial program 73.9%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6463.5
Applied rewrites63.5%
Final simplification64.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -2.45e+113)
(* (fma (- i) j (* z x)) y)
(if (<= z -4.4e+45)
(* (fma (- z) b (* j a)) c)
(if (<= z 6e-223)
(* (fma (- i) y (* c a)) j)
(if (<= z 9.6e+56)
(* (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 (z <= -2.45e+113) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= -4.4e+45) {
tmp = fma(-z, b, (j * a)) * c;
} else if (z <= 6e-223) {
tmp = fma(-i, y, (c * a)) * j;
} else if (z <= 9.6e+56) {
tmp = fma(-x, a, (i * b)) * t;
} else {
tmp = fma(-c, b, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -2.45e+113) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= -4.4e+45) tmp = Float64(fma(Float64(-z), b, Float64(j * a)) * c); elseif (z <= 6e-223) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (z <= 9.6e+56) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); 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_] := If[LessEqual[z, -2.45e+113], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -4.4e+45], N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 6e-223], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 9.6e+56], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+113}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -4.4 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-223}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < -2.45000000000000011e113Initial program 55.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-*.f6471.2
Applied rewrites71.2%
if -2.45000000000000011e113 < z < -4.4000000000000001e45Initial program 78.9%
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-*.f6471.6
Applied rewrites71.6%
if -4.4000000000000001e45 < z < 5.99999999999999983e-223Initial program 75.8%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
if 5.99999999999999983e-223 < z < 9.60000000000000053e56Initial program 77.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-*.f6456.4
Applied rewrites56.4%
if 9.60000000000000053e56 < z Initial program 60.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-*.f6481.3
Applied rewrites81.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.3e-47)
(* (fma (- i) j (* z x)) y)
(if (<= z -9e-124)
(* (fma (- y) j (* b t)) i)
(if (<= z 6e-223)
(* (fma (- i) y (* c a)) j)
(if (<= z 9.6e+56)
(* (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 (z <= -1.3e-47) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= -9e-124) {
tmp = fma(-y, j, (b * t)) * i;
} else if (z <= 6e-223) {
tmp = fma(-i, y, (c * a)) * j;
} else if (z <= 9.6e+56) {
tmp = fma(-x, a, (i * b)) * t;
} else {
tmp = fma(-c, b, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.3e-47) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= -9e-124) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); elseif (z <= 6e-223) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (z <= 9.6e+56) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); 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_] := If[LessEqual[z, -1.3e-47], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, -9e-124], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[z, 6e-223], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 9.6e+56], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-47}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq -9 \cdot 10^{-124}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-223}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < -1.3e-47Initial program 62.1%
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.3
Applied rewrites57.3%
if -1.3e-47 < z < -8.9999999999999992e-124Initial program 74.8%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6463.7
Applied rewrites63.7%
if -8.9999999999999992e-124 < z < 5.99999999999999983e-223Initial program 79.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.9
Applied rewrites55.9%
if 5.99999999999999983e-223 < z < 9.60000000000000053e56Initial program 77.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-*.f6456.4
Applied rewrites56.4%
if 9.60000000000000053e56 < z Initial program 60.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-*.f6481.3
Applied rewrites81.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= z -2.5e+113)
t_1
(if (<= z 6.6e-207)
(* (* j a) c)
(if (<= z 1.8e-25)
(* (* i b) t)
(if (<= z 1.2e+111) t_1 (* (* (- c) b) z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -2.5e+113) {
tmp = t_1;
} else if (z <= 6.6e-207) {
tmp = (j * a) * c;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else if (z <= 1.2e+111) {
tmp = t_1;
} else {
tmp = (-c * b) * 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 = (z * x) * y
if (z <= (-2.5d+113)) then
tmp = t_1
else if (z <= 6.6d-207) then
tmp = (j * a) * c
else if (z <= 1.8d-25) then
tmp = (i * b) * t
else if (z <= 1.2d+111) then
tmp = t_1
else
tmp = (-c * b) * 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 = (z * x) * y;
double tmp;
if (z <= -2.5e+113) {
tmp = t_1;
} else if (z <= 6.6e-207) {
tmp = (j * a) * c;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else if (z <= 1.2e+111) {
tmp = t_1;
} else {
tmp = (-c * b) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -2.5e+113: tmp = t_1 elif z <= 6.6e-207: tmp = (j * a) * c elif z <= 1.8e-25: tmp = (i * b) * t elif z <= 1.2e+111: tmp = t_1 else: tmp = (-c * b) * z return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -2.5e+113) tmp = t_1; elseif (z <= 6.6e-207) tmp = Float64(Float64(j * a) * c); elseif (z <= 1.8e-25) tmp = Float64(Float64(i * b) * t); elseif (z <= 1.2e+111) tmp = t_1; else tmp = Float64(Float64(Float64(-c) * b) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (z <= -2.5e+113) tmp = t_1; elseif (z <= 6.6e-207) tmp = (j * a) * c; elseif (z <= 1.8e-25) tmp = (i * b) * t; elseif (z <= 1.2e+111) tmp = t_1; else tmp = (-c * b) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -2.5e+113], t$95$1, If[LessEqual[z, 6.6e-207], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 1.8e-25], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.2e+111], t$95$1, N[(N[((-c) * b), $MachinePrecision] * z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-25}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-c\right) \cdot b\right) \cdot z\\
\end{array}
\end{array}
if z < -2.5e113 or 1.8e-25 < z < 1.20000000000000003e111Initial program 63.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.4
Applied rewrites56.4%
Taylor expanded in x around inf
Applied rewrites47.9%
Applied rewrites50.8%
if -2.5e113 < z < 6.5999999999999996e-207Initial program 75.7%
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-*.f6438.2
Applied rewrites38.2%
Taylor expanded in z around 0
Applied rewrites29.4%
if 6.5999999999999996e-207 < z < 1.8e-25Initial program 78.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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites40.2%
if 1.20000000000000003e111 < z Initial program 58.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6482.9
Applied rewrites82.9%
Taylor expanded in x around 0
Applied rewrites52.2%
Final simplification40.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)))
(if (<= z -2.5e+113)
t_1
(if (<= z 6.6e-207)
(* (* j a) c)
(if (<= z 1.8e-25)
(* (* i b) t)
(if (<= z 1.2e+111) t_1 (* (* (- z) b) c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -2.5e+113) {
tmp = t_1;
} else if (z <= 6.6e-207) {
tmp = (j * a) * c;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else if (z <= 1.2e+111) {
tmp = t_1;
} else {
tmp = (-z * b) * c;
}
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 = (z * x) * y
if (z <= (-2.5d+113)) then
tmp = t_1
else if (z <= 6.6d-207) then
tmp = (j * a) * c
else if (z <= 1.8d-25) then
tmp = (i * b) * t
else if (z <= 1.2d+111) then
tmp = t_1
else
tmp = (-z * b) * c
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 = (z * x) * y;
double tmp;
if (z <= -2.5e+113) {
tmp = t_1;
} else if (z <= 6.6e-207) {
tmp = (j * a) * c;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else if (z <= 1.2e+111) {
tmp = t_1;
} else {
tmp = (-z * b) * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -2.5e+113: tmp = t_1 elif z <= 6.6e-207: tmp = (j * a) * c elif z <= 1.8e-25: tmp = (i * b) * t elif z <= 1.2e+111: tmp = t_1 else: tmp = (-z * b) * c return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -2.5e+113) tmp = t_1; elseif (z <= 6.6e-207) tmp = Float64(Float64(j * a) * c); elseif (z <= 1.8e-25) tmp = Float64(Float64(i * b) * t); elseif (z <= 1.2e+111) tmp = t_1; else tmp = Float64(Float64(Float64(-z) * b) * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (z <= -2.5e+113) tmp = t_1; elseif (z <= 6.6e-207) tmp = (j * a) * c; elseif (z <= 1.8e-25) tmp = (i * b) * t; elseif (z <= 1.2e+111) tmp = t_1; else tmp = (-z * b) * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -2.5e+113], t$95$1, If[LessEqual[z, 6.6e-207], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 1.8e-25], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.2e+111], t$95$1, N[(N[((-z) * b), $MachinePrecision] * c), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-25}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-z\right) \cdot b\right) \cdot c\\
\end{array}
\end{array}
if z < -2.5e113 or 1.8e-25 < z < 1.20000000000000003e111Initial program 63.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.4
Applied rewrites56.4%
Taylor expanded in x around inf
Applied rewrites47.9%
Applied rewrites50.8%
if -2.5e113 < z < 6.5999999999999996e-207Initial program 75.7%
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-*.f6438.2
Applied rewrites38.2%
Taylor expanded in z around 0
Applied rewrites29.4%
if 6.5999999999999996e-207 < z < 1.8e-25Initial program 78.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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites40.2%
if 1.20000000000000003e111 < z Initial program 58.7%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6482.9
Applied rewrites82.9%
Taylor expanded in x around inf
Applied rewrites37.5%
Taylor expanded in x around 0
Applied rewrites50.1%
Final simplification39.7%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -3.6e-12)
(* (fma (- i) j (* z x)) y)
(if (<= z 6e-223)
(* (fma (- i) y (* c a)) j)
(if (<= z 9.6e+56)
(* (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 (z <= -3.6e-12) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= 6e-223) {
tmp = fma(-i, y, (c * a)) * j;
} else if (z <= 9.6e+56) {
tmp = fma(-x, a, (i * b)) * t;
} else {
tmp = fma(-c, b, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -3.6e-12) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= 6e-223) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (z <= 9.6e+56) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); 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_] := If[LessEqual[z, -3.6e-12], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 6e-223], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[z, 9.6e+56], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-12}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-223}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < -3.6e-12Initial program 61.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.6
Applied rewrites57.6%
if -3.6e-12 < z < 5.99999999999999983e-223Initial program 77.5%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.7
Applied rewrites52.7%
if 5.99999999999999983e-223 < z < 9.60000000000000053e56Initial program 77.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-*.f6456.4
Applied rewrites56.4%
if 9.60000000000000053e56 < z Initial program 60.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-*.f6481.3
Applied rewrites81.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* z y)) x)))
(if (<= x -1.05e+30)
t_1
(if (<= x 6.5e-23) (* (fma (- i) y (* c a)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (z * y)) * x;
double tmp;
if (x <= -1.05e+30) {
tmp = t_1;
} else if (x <= 6.5e-23) {
tmp = fma(-i, y, (c * a)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-t), a, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.05e+30) tmp = t_1; elseif (x <= 6.5e-23) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.05e+30], t$95$1, If[LessEqual[x, 6.5e-23], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-23}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.05e30 or 6.5e-23 < x Initial program 68.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.4
Applied rewrites64.4%
if -1.05e30 < x < 6.5e-23Initial program 72.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.8
Applied rewrites49.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -3.6e-12)
(* (fma (- i) j (* z x)) y)
(if (<= z 1.8e-13)
(* (fma (- i) y (* c a)) j)
(* (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 (z <= -3.6e-12) {
tmp = fma(-i, j, (z * x)) * y;
} else if (z <= 1.8e-13) {
tmp = fma(-i, y, (c * a)) * j;
} else {
tmp = fma(-c, b, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -3.6e-12) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); elseif (z <= 1.8e-13) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); 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_] := If[LessEqual[z, -3.6e-12], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 1.8e-13], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{-12}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-13}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < -3.6e-12Initial program 61.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.6
Applied rewrites57.6%
if -3.6e-12 < z < 1.7999999999999999e-13Initial program 77.7%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6448.3
Applied rewrites48.3%
if 1.7999999999999999e-13 < z Initial program 63.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-*.f6473.3
Applied rewrites73.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -2.5e+113)
(* (* z x) y)
(if (<= z 6.6e-207)
(* (* j a) c)
(if (<= z 1.8e-25) (* (* i b) t) (* (* 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 <= -2.5e+113) {
tmp = (z * x) * y;
} else if (z <= 6.6e-207) {
tmp = (j * a) * c;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else {
tmp = (y * x) * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-2.5d+113)) then
tmp = (z * x) * y
else if (z <= 6.6d-207) then
tmp = (j * a) * c
else if (z <= 1.8d-25) then
tmp = (i * b) * t
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -2.5e+113) {
tmp = (z * x) * y;
} else if (z <= 6.6e-207) {
tmp = (j * a) * c;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -2.5e+113: tmp = (z * x) * y elif z <= 6.6e-207: tmp = (j * a) * c elif z <= 1.8e-25: tmp = (i * b) * t else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -2.5e+113) tmp = Float64(Float64(z * x) * y); elseif (z <= 6.6e-207) tmp = Float64(Float64(j * a) * c); elseif (z <= 1.8e-25) tmp = Float64(Float64(i * b) * t); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -2.5e+113) tmp = (z * x) * y; elseif (z <= 6.6e-207) tmp = (j * a) * c; elseif (z <= 1.8e-25) tmp = (i * b) * t; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -2.5e+113], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 6.6e-207], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 1.8e-25], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{+113}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-25}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < -2.5e113Initial program 55.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-*.f6463.1
Applied rewrites63.1%
Taylor expanded in x around inf
Applied rewrites51.7%
Applied rewrites54.0%
if -2.5e113 < z < 6.5999999999999996e-207Initial program 75.7%
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-*.f6438.2
Applied rewrites38.2%
Taylor expanded in z around 0
Applied rewrites29.4%
if 6.5999999999999996e-207 < z < 1.8e-25Initial program 78.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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites40.2%
if 1.8e-25 < z Initial program 65.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-*.f6468.8
Applied rewrites68.8%
Taylor expanded in x around inf
Applied rewrites41.9%
Final simplification38.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.15e-19)
(* (* z x) y)
(if (<= z 6.8e-207)
(* (* j c) a)
(if (<= z 1.8e-25) (* (* i b) t) (* (* 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 <= -1.15e-19) {
tmp = (z * x) * y;
} else if (z <= 6.8e-207) {
tmp = (j * c) * a;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else {
tmp = (y * x) * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-1.15d-19)) then
tmp = (z * x) * y
else if (z <= 6.8d-207) then
tmp = (j * c) * a
else if (z <= 1.8d-25) then
tmp = (i * b) * t
else
tmp = (y * x) * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.15e-19) {
tmp = (z * x) * y;
} else if (z <= 6.8e-207) {
tmp = (j * c) * a;
} else if (z <= 1.8e-25) {
tmp = (i * b) * t;
} else {
tmp = (y * x) * z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.15e-19: tmp = (z * x) * y elif z <= 6.8e-207: tmp = (j * c) * a elif z <= 1.8e-25: tmp = (i * b) * t else: tmp = (y * x) * z return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.15e-19) tmp = Float64(Float64(z * x) * y); elseif (z <= 6.8e-207) tmp = Float64(Float64(j * c) * a); elseif (z <= 1.8e-25) tmp = Float64(Float64(i * b) * t); else tmp = Float64(Float64(y * x) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.15e-19) tmp = (z * x) * y; elseif (z <= 6.8e-207) tmp = (j * c) * a; elseif (z <= 1.8e-25) tmp = (i * b) * t; else tmp = (y * x) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.15e-19], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[z, 6.8e-207], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 1.8e-25], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-19}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-207}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-25}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < -1.1499999999999999e-19Initial program 61.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.9
Applied rewrites54.9%
Taylor expanded in x around inf
Applied rewrites38.8%
Applied rewrites41.6%
if -1.1499999999999999e-19 < z < 6.79999999999999997e-207Initial program 76.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-*.f6434.0
Applied rewrites34.0%
Taylor expanded in z around 0
Applied rewrites29.4%
if 6.79999999999999997e-207 < z < 1.8e-25Initial program 78.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-*.f6456.3
Applied rewrites56.3%
Taylor expanded in x around 0
Applied rewrites40.2%
if 1.8e-25 < z Initial program 65.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-*.f6468.8
Applied rewrites68.8%
Taylor expanded in x around inf
Applied rewrites41.9%
Final simplification37.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= z 2.1e+89) (* (fma (- i) j (* z x)) y) (* (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 (z <= 2.1e+89) {
tmp = fma(-i, j, (z * x)) * y;
} else {
tmp = fma(-c, b, (y * x)) * z;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= 2.1e+89) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); 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_] := If[LessEqual[z, 2.1e+89], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.1 \cdot 10^{+89}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\end{array}
\end{array}
if z < 2.09999999999999986e89Initial program 72.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.1
Applied rewrites42.1%
if 2.09999999999999986e89 < z Initial program 57.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-*.f6484.0
Applied rewrites84.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= x -2.1e-39) (* (* y x) z) (if (<= x 2.25e-41) (* (* j c) a) (* (* z x) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2.1e-39) {
tmp = (y * x) * z;
} else if (x <= 2.25e-41) {
tmp = (j * c) * a;
} else {
tmp = (z * x) * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2.1d-39)) then
tmp = (y * x) * z
else if (x <= 2.25d-41) then
tmp = (j * c) * a
else
tmp = (z * x) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2.1e-39) {
tmp = (y * x) * z;
} else if (x <= 2.25e-41) {
tmp = (j * c) * a;
} else {
tmp = (z * x) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2.1e-39: tmp = (y * x) * z elif x <= 2.25e-41: tmp = (j * c) * a else: tmp = (z * x) * y return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2.1e-39) tmp = Float64(Float64(y * x) * z); elseif (x <= 2.25e-41) tmp = Float64(Float64(j * c) * a); else tmp = Float64(Float64(z * x) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2.1e-39) tmp = (y * x) * z; elseif (x <= 2.25e-41) tmp = (j * c) * a; else tmp = (z * x) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2.1e-39], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 2.25e-41], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{-39}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{-41}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\end{array}
\end{array}
if x < -2.09999999999999993e-39Initial program 78.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6442.7
Applied rewrites42.7%
Taylor expanded in x around inf
Applied rewrites33.7%
if -2.09999999999999993e-39 < x < 2.25e-41Initial program 71.5%
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-*.f6451.1
Applied rewrites51.1%
Taylor expanded in z around 0
Applied rewrites30.4%
if 2.25e-41 < x Initial program 59.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-*.f6444.9
Applied rewrites44.9%
Taylor expanded in x around inf
Applied rewrites39.7%
Applied rewrites42.2%
Final simplification34.7%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* z x) y))) (if (<= z -1.15e-19) t_1 (if (<= z 7.2e-49) (* (* j c) a) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * x) * y;
double tmp;
if (z <= -1.15e-19) {
tmp = t_1;
} else if (z <= 7.2e-49) {
tmp = (j * c) * a;
} 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 = (z * x) * y
if (z <= (-1.15d-19)) then
tmp = t_1
else if (z <= 7.2d-49) then
tmp = (j * c) * a
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 = (z * x) * y;
double tmp;
if (z <= -1.15e-19) {
tmp = t_1;
} else if (z <= 7.2e-49) {
tmp = (j * c) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y tmp = 0 if z <= -1.15e-19: tmp = t_1 elif z <= 7.2e-49: tmp = (j * c) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) tmp = 0.0 if (z <= -1.15e-19) tmp = t_1; elseif (z <= 7.2e-49) tmp = Float64(Float64(j * c) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * x) * y; tmp = 0.0; if (z <= -1.15e-19) tmp = t_1; elseif (z <= 7.2e-49) tmp = (j * c) * a; 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[(z * x), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[z, -1.15e-19], t$95$1, If[LessEqual[z, 7.2e-49], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-49}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1499999999999999e-19 or 7.19999999999999939e-49 < z Initial program 63.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.3
Applied rewrites59.3%
Taylor expanded in x around inf
Applied rewrites38.0%
Applied rewrites40.0%
if -1.1499999999999999e-19 < z < 7.19999999999999939e-49Initial program 77.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-*.f6436.3
Applied rewrites36.3%
Taylor expanded in z around 0
Applied rewrites27.3%
(FPCore (x y z t a b c i j) :precision binary64 (* (* z x) y))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * x) * y;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (z * x) * y
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (z * x) * y;
}
def code(x, y, z, t, a, b, c, i, j): return (z * x) * y
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(z * x) * y) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (z * x) * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\left(z \cdot x\right) \cdot y
\end{array}
Initial program 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-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
Applied rewrites23.4%
Applied rewrites24.4%
(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 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-*.f6439.1
Applied rewrites39.1%
Taylor expanded in x around inf
Applied rewrites23.4%
Final simplification23.4%
(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 2024283
(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)))))