
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* (- (* a t) (* z y)) x) (* (- (* i a) (* c z)) b))))
(if (<= (- (* (- (* c t) (* i y)) j) t_1) INFINITY)
(- (/ j (/ 1.0 (fma (- y) i (* c t)))) t_1)
(* (fma (- x) t (* i b)) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (((a * t) - (z * y)) * x) - (((i * a) - (c * z)) * b);
double tmp;
if (((((c * t) - (i * y)) * j) - t_1) <= ((double) INFINITY)) {
tmp = (j / (1.0 / fma(-y, i, (c * t)))) - t_1;
} else {
tmp = fma(-x, t, (i * b)) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * a) - Float64(c * z)) * b)) tmp = 0.0 if (Float64(Float64(Float64(Float64(c * t) - Float64(i * y)) * j) - t_1) <= Inf) tmp = Float64(Float64(j / Float64(1.0 / fma(Float64(-y), i, Float64(c * t)))) - t_1); else tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - t$95$1), $MachinePrecision], Infinity], N[(N[(j / N[(1.0 / N[((-y) * i + N[(c * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot a - c \cdot z\right) \cdot b\\
\mathbf{if}\;\left(c \cdot t - i \cdot y\right) \cdot j - t\_1 \leq \infty:\\
\;\;\;\;\frac{j}{\frac{1}{\mathsf{fma}\left(-y, i, c \cdot t\right)}} - t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 91.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-/.f6491.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.f6491.7
Applied rewrites91.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6459.8
Applied rewrites59.8%
Final simplification86.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(-
(* (- (* c t) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i a) (* c z)) b)))))
(if (<= t_1 INFINITY) t_1 (* (fma (- x) t (* i b)) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (((c * t) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * a) - (c * z)) * b));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(-x, t, (i * b)) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(c * t) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * a) - Float64(c * z)) * b))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(N[(c * t), $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 * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot t - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot a - c \cdot z\right) \cdot b\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 91.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6459.8
Applied rewrites59.8%
Final simplification86.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<=
(-
(* (- (* c t) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i a) (* c z)) b)))
INFINITY)
(fma
(fma (- c) z (* i a))
b
(fma (fma (- x) a (* j c)) t (* (fma (- j) i (* z x)) y)))
(* (fma (- x) t (* i b)) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (((((c * t) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * a) - (c * z)) * b))) <= ((double) INFINITY)) {
tmp = fma(fma(-c, z, (i * a)), b, fma(fma(-x, a, (j * c)), t, (fma(-j, i, (z * x)) * y)));
} else {
tmp = fma(-x, t, (i * b)) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (Float64(Float64(Float64(Float64(c * t) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * a) - Float64(c * z)) * b))) <= Inf) tmp = fma(fma(Float64(-c), z, Float64(i * a)), b, fma(fma(Float64(-x), a, Float64(j * c)), t, Float64(fma(Float64(-j), i, Float64(z * x)) * y))); else tmp = Float64(fma(Float64(-x), t, Float64(i * b)) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[N[(N[(N[(N[(c * t), $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 * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(c \cdot t - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot a - c \cdot z\right) \cdot b\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-x, a, j \cdot c\right), t, \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, t, i \cdot b\right) \cdot a\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 91.7%
Taylor expanded in y around 0
Applied rewrites84.5%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6459.8
Applied rewrites59.8%
Final simplification80.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* z y)) x))
(t_2
(- (fma (fma (- b) z (* j t)) c t_1) (* (fma (- b) a (* j y)) i))))
(if (<= x -4.9e-26)
t_2
(if (<= x 2.75e-132)
(fma
(fma (- c) z (* i a))
b
(fma (fma (- x) a (* j c)) t (* (fma (- j) i (* z x)) y)))
(if (<= x 4.2e+88) t_2 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (z * y)) * x;
double t_2 = fma(fma(-b, z, (j * t)), c, t_1) - (fma(-b, a, (j * y)) * i);
double tmp;
if (x <= -4.9e-26) {
tmp = t_2;
} else if (x <= 2.75e-132) {
tmp = fma(fma(-c, z, (i * a)), b, fma(fma(-x, a, (j * c)), t, (fma(-j, i, (z * x)) * y)));
} else if (x <= 4.2e+88) {
tmp = t_2;
} 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) t_2 = Float64(fma(fma(Float64(-b), z, Float64(j * t)), c, t_1) - Float64(fma(Float64(-b), a, Float64(j * y)) * i)) tmp = 0.0 if (x <= -4.9e-26) tmp = t_2; elseif (x <= 2.75e-132) tmp = fma(fma(Float64(-c), z, Float64(i * a)), b, fma(fma(Float64(-x), a, Float64(j * c)), t, Float64(fma(Float64(-j), i, Float64(z * x)) * y))); elseif (x <= 4.2e+88) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c + t$95$1), $MachinePrecision] - N[(N[((-b) * a + N[(j * y), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.9e-26], t$95$2, If[LessEqual[x, 2.75e-132], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e+88], t$95$2, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
t_2 := \mathsf{fma}\left(\mathsf{fma}\left(-b, z, j \cdot t\right), c, t\_1\right) - \mathsf{fma}\left(-b, a, j \cdot y\right) \cdot i\\
\mathbf{if}\;x \leq -4.9 \cdot 10^{-26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-132}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \mathsf{fma}\left(\mathsf{fma}\left(-x, a, j \cdot c\right), t, \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\right)\right)\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+88}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.8999999999999999e-26 or 2.75e-132 < x < 4.2e88Initial program 74.8%
Taylor expanded in c around 0
Applied rewrites82.7%
if -4.8999999999999999e-26 < x < 2.75e-132Initial program 79.2%
Taylor expanded in y around 0
Applied rewrites89.0%
if 4.2e88 < x Initial program 71.8%
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-*.f6480.9
Applied rewrites80.9%
Final simplification84.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* z y)) x)))
(if (<= x -6.6e-63)
(fma (fma (- j) y (* b a)) i t_1)
(if (<= x 6.3e-136)
(fma (fma (- c) z (* i a)) b (* (fma (- j) i (* z x)) y))
(if (<= x 2.2e+38)
(fma (fma (- y) j (* b a)) i (* (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(-t, a, (z * y)) * x;
double tmp;
if (x <= -6.6e-63) {
tmp = fma(fma(-j, y, (b * a)), i, t_1);
} else if (x <= 6.3e-136) {
tmp = fma(fma(-c, z, (i * a)), b, (fma(-j, i, (z * x)) * y));
} else if (x <= 2.2e+38) {
tmp = fma(fma(-y, j, (b * a)), i, (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(-t), a, Float64(z * y)) * x) tmp = 0.0 if (x <= -6.6e-63) tmp = fma(fma(Float64(-j), y, Float64(b * a)), i, t_1); elseif (x <= 6.3e-136) tmp = fma(fma(Float64(-c), z, Float64(i * a)), b, Float64(fma(Float64(-j), i, Float64(z * x)) * y)); elseif (x <= 2.2e+38) tmp = fma(fma(Float64(-y), j, Float64(b * a)), i, 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[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -6.6e-63], N[(N[((-j) * y + N[(b * a), $MachinePrecision]), $MachinePrecision] * i + t$95$1), $MachinePrecision], If[LessEqual[x, 6.3e-136], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+38], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $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 -6.6 \cdot 10^{-63}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-j, y, b \cdot a\right), i, t\_1\right)\\
\mathbf{elif}\;x \leq 6.3 \cdot 10^{-136}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, j, b \cdot a\right), i, \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.59999999999999987e-63Initial program 81.9%
Taylor expanded in c around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
cancel-sign-subN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
Applied rewrites69.7%
if -6.59999999999999987e-63 < x < 6.3000000000000004e-136Initial program 77.9%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites72.1%
if 6.3000000000000004e-136 < x < 2.20000000000000006e38Initial program 68.7%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites62.2%
Taylor expanded in z around 0
Applied rewrites75.5%
if 2.20000000000000006e38 < x Initial program 71.0%
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-*.f6477.1
Applied rewrites77.1%
Final simplification73.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* z y)) x)))
(if (<= x -1.65e+86)
t_1
(if (<= x 6.3e-136)
(fma (fma (- c) z (* i a)) b (* (fma (- j) i (* z x)) y))
(if (<= x 2.2e+38)
(fma (fma (- y) j (* b a)) i (* (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(-t, a, (z * y)) * x;
double tmp;
if (x <= -1.65e+86) {
tmp = t_1;
} else if (x <= 6.3e-136) {
tmp = fma(fma(-c, z, (i * a)), b, (fma(-j, i, (z * x)) * y));
} else if (x <= 2.2e+38) {
tmp = fma(fma(-y, j, (b * a)), i, (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(-t), a, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.65e+86) tmp = t_1; elseif (x <= 6.3e-136) tmp = fma(fma(Float64(-c), z, Float64(i * a)), b, Float64(fma(Float64(-j), i, Float64(z * x)) * y)); elseif (x <= 2.2e+38) tmp = fma(fma(Float64(-y), j, Float64(b * a)), i, 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[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.65e+86], t$95$1, If[LessEqual[x, 6.3e-136], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.2e+38], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $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.65 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.3 \cdot 10^{-136}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\right)\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, j, b \cdot a\right), i, \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.65e86 or 2.20000000000000006e38 < x Initial program 75.3%
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-*.f6475.3
Applied rewrites75.3%
if -1.65e86 < x < 6.3000000000000004e-136Initial program 79.1%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites69.5%
if 6.3000000000000004e-136 < x < 2.20000000000000006e38Initial program 68.7%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites62.2%
Taylor expanded in z around 0
Applied rewrites75.5%
Final simplification72.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- c) z (* i a)) b (* (* y x) z))))
(if (<= z -3.7e-67)
t_1
(if (<= z -2.55e-276)
(fma (fma (- x) t (* i b)) a (* (* j t) c))
(if (<= z 4.2e+78)
(- (* (* (- a) t) x) (* (- (* i y) (* c t)) j))
t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(fma(-c, z, (i * a)), b, ((y * x) * z));
double tmp;
if (z <= -3.7e-67) {
tmp = t_1;
} else if (z <= -2.55e-276) {
tmp = fma(fma(-x, t, (i * b)), a, ((j * t) * c));
} else if (z <= 4.2e+78) {
tmp = ((-a * t) * x) - (((i * y) - (c * t)) * j);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(fma(Float64(-c), z, Float64(i * a)), b, Float64(Float64(y * x) * z)) tmp = 0.0 if (z <= -3.7e-67) tmp = t_1; elseif (z <= -2.55e-276) tmp = fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(Float64(j * t) * c)); elseif (z <= 4.2e+78) tmp = Float64(Float64(Float64(Float64(-a) * t) * x) - Float64(Float64(Float64(i * y) - Float64(c * t)) * 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[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e-67], t$95$1, If[LessEqual[z, -2.55e-276], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+78], N[(N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * y), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \left(y \cdot x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{-276}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \left(j \cdot t\right) \cdot c\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+78}:\\
\;\;\;\;\left(\left(-a\right) \cdot t\right) \cdot x - \left(i \cdot y - c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.6999999999999999e-67 or 4.2000000000000002e78 < z Initial program 70.0%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites66.3%
Taylor expanded in j around 0
Applied rewrites70.0%
if -3.6999999999999999e-67 < z < -2.54999999999999984e-276Initial program 76.2%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites67.4%
Taylor expanded in i around 0
Applied rewrites72.3%
if -2.54999999999999984e-276 < z < 4.2000000000000002e78Initial program 84.8%
Taylor expanded in t 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-*.f6470.5
Applied rewrites70.5%
Final simplification70.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.25e-75)
(fma (fma (- y) j (* b a)) i (* (fma (- c) b (* y x)) z))
(if (<= z 4.2e+79)
(fma (fma (- x) t (* i b)) a (* (fma (- i) y (* c t)) j))
(fma (fma (- c) z (* i a)) 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.25e-75) {
tmp = fma(fma(-y, j, (b * a)), i, (fma(-c, b, (y * x)) * z));
} else if (z <= 4.2e+79) {
tmp = fma(fma(-x, t, (i * b)), a, (fma(-i, y, (c * t)) * j));
} else {
tmp = fma(fma(-c, z, (i * a)), b, ((y * x) * z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.25e-75) tmp = fma(fma(Float64(-y), j, Float64(b * a)), i, Float64(fma(Float64(-c), b, Float64(y * x)) * z)); elseif (z <= 4.2e+79) tmp = fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(fma(Float64(-i), y, Float64(c * t)) * j)); else tmp = fma(fma(Float64(-c), z, Float64(i * a)), b, Float64(Float64(y * x) * z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.25e-75], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+79], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{-75}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, j, b \cdot a\right), i, \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+79}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \left(y \cdot x\right) \cdot z\right)\\
\end{array}
\end{array}
if z < -1.24999999999999995e-75Initial program 71.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites62.9%
Taylor expanded in z around 0
Applied rewrites69.1%
if -1.24999999999999995e-75 < z < 4.20000000000000016e79Initial program 83.0%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites74.9%
if 4.20000000000000016e79 < z Initial program 66.5%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites70.8%
Taylor expanded in j around 0
Applied rewrites76.2%
Final simplification73.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.55e+91)
t_1
(if (<= x 2.2e+38)
(fma (fma (- y) j (* b a)) i (* (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(-t, a, (z * y)) * x;
double tmp;
if (x <= -1.55e+91) {
tmp = t_1;
} else if (x <= 2.2e+38) {
tmp = fma(fma(-y, j, (b * a)), i, (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(-t), a, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.55e+91) tmp = t_1; elseif (x <= 2.2e+38) tmp = fma(fma(Float64(-y), j, Float64(b * a)), i, 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[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.55e+91], t$95$1, If[LessEqual[x, 2.2e+38], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i + N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $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.55 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{+38}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, j, b \cdot a\right), i, \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.54999999999999999e91 or 2.20000000000000006e38 < x Initial program 75.1%
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-*.f6476.1
Applied rewrites76.1%
if -1.54999999999999999e91 < x < 2.20000000000000006e38Initial program 76.5%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites67.2%
Taylor expanded in z around 0
Applied rewrites67.0%
Final simplification70.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- t) x) a)))
(if (<= x -5.4e+213)
(* (* y x) z)
(if (<= x -6.2e-64)
t_1
(if (<= x -2.4e-224)
(* (* (- z) c) b)
(if (<= x 3.8e-34)
(* (* i b) a)
(if (<= x 3.9e+33) (* (* (- b) z) c) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-t * x) * a;
double tmp;
if (x <= -5.4e+213) {
tmp = (y * x) * z;
} else if (x <= -6.2e-64) {
tmp = t_1;
} else if (x <= -2.4e-224) {
tmp = (-z * c) * b;
} else if (x <= 3.8e-34) {
tmp = (i * b) * a;
} else if (x <= 3.9e+33) {
tmp = (-b * z) * c;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (-t * x) * a
if (x <= (-5.4d+213)) then
tmp = (y * x) * z
else if (x <= (-6.2d-64)) then
tmp = t_1
else if (x <= (-2.4d-224)) then
tmp = (-z * c) * b
else if (x <= 3.8d-34) then
tmp = (i * b) * a
else if (x <= 3.9d+33) then
tmp = (-b * z) * c
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-t * x) * a;
double tmp;
if (x <= -5.4e+213) {
tmp = (y * x) * z;
} else if (x <= -6.2e-64) {
tmp = t_1;
} else if (x <= -2.4e-224) {
tmp = (-z * c) * b;
} else if (x <= 3.8e-34) {
tmp = (i * b) * a;
} else if (x <= 3.9e+33) {
tmp = (-b * z) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-t * x) * a tmp = 0 if x <= -5.4e+213: tmp = (y * x) * z elif x <= -6.2e-64: tmp = t_1 elif x <= -2.4e-224: tmp = (-z * c) * b elif x <= 3.8e-34: tmp = (i * b) * a elif x <= 3.9e+33: tmp = (-b * z) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-t) * x) * a) tmp = 0.0 if (x <= -5.4e+213) tmp = Float64(Float64(y * x) * z); elseif (x <= -6.2e-64) tmp = t_1; elseif (x <= -2.4e-224) tmp = Float64(Float64(Float64(-z) * c) * b); elseif (x <= 3.8e-34) tmp = Float64(Float64(i * b) * a); elseif (x <= 3.9e+33) tmp = Float64(Float64(Float64(-b) * z) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-t * x) * a; tmp = 0.0; if (x <= -5.4e+213) tmp = (y * x) * z; elseif (x <= -6.2e-64) tmp = t_1; elseif (x <= -2.4e-224) tmp = (-z * c) * b; elseif (x <= 3.8e-34) tmp = (i * b) * a; elseif (x <= 3.9e+33) tmp = (-b * z) * c; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[x, -5.4e+213], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, -6.2e-64], t$95$1, If[LessEqual[x, -2.4e-224], N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 3.8e-34], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 3.9e+33], N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+213}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-224}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-34}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{+33}:\\
\;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.4000000000000002e213Initial program 75.5%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites56.9%
Taylor expanded in x around inf
Applied rewrites61.5%
if -5.4000000000000002e213 < x < -6.20000000000000049e-64 or 3.9000000000000002e33 < x Initial program 77.2%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites52.4%
Taylor expanded in x around inf
Applied rewrites40.5%
if -6.20000000000000049e-64 < x < -2.40000000000000014e-224Initial program 68.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.3
Applied rewrites53.3%
Taylor expanded in b around inf
Applied rewrites34.3%
if -2.40000000000000014e-224 < x < 3.8000000000000001e-34Initial program 82.5%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites72.6%
Taylor expanded in b around inf
Applied rewrites42.1%
if 3.8000000000000001e-34 < x < 3.9000000000000002e33Initial program 59.8%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6448.0
Applied rewrites48.0%
Taylor expanded in b around inf
Applied rewrites41.9%
Final simplification41.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- c) b (* y x)) z)))
(if (<= c -8e+101)
(* (fma t j (* (- b) z)) c)
(if (<= c 6e-258)
t_1
(if (<= c 6.7e-57)
(* (* (- t) x) a)
(if (<= c 160000.0) t_1 (* (fma (- b) z (* j t)) c)))))))
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 (c <= -8e+101) {
tmp = fma(t, j, (-b * z)) * c;
} else if (c <= 6e-258) {
tmp = t_1;
} else if (c <= 6.7e-57) {
tmp = (-t * x) * a;
} else if (c <= 160000.0) {
tmp = t_1;
} else {
tmp = fma(-b, z, (j * t)) * c;
}
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 (c <= -8e+101) tmp = Float64(fma(t, j, Float64(Float64(-b) * z)) * c); elseif (c <= 6e-258) tmp = t_1; elseif (c <= 6.7e-57) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (c <= 160000.0) tmp = t_1; else tmp = Float64(fma(Float64(-b), z, Float64(j * t)) * c); 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[c, -8e+101], N[(N[(t * j + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[c, 6e-258], t$95$1, If[LessEqual[c, 6.7e-57], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[c, 160000.0], t$95$1, N[(N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{if}\;c \leq -8 \cdot 10^{+101}:\\
\;\;\;\;\mathsf{fma}\left(t, j, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;c \leq 6 \cdot 10^{-258}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 6.7 \cdot 10^{-57}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;c \leq 160000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c\\
\end{array}
\end{array}
if c < -7.9999999999999998e101Initial program 64.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
Applied rewrites72.6%
if -7.9999999999999998e101 < c < 6.00000000000000042e-258 or 6.7000000000000006e-57 < c < 1.6e5Initial program 80.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
lower-*.f6446.0
Applied rewrites46.0%
if 6.00000000000000042e-258 < c < 6.7000000000000006e-57Initial program 79.2%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites74.4%
Taylor expanded in x around inf
Applied rewrites45.8%
if 1.6e5 < c Initial program 71.0%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.1
Applied rewrites63.1%
Final simplification53.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- c) z (* i a)) b (* (* y x) z))))
(if (<= z -3.7e-67)
t_1
(if (<= z 5.4e+77) (fma (fma (- x) t (* i b)) a (* (* j t) c)) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(fma(-c, z, (i * a)), b, ((y * x) * z));
double tmp;
if (z <= -3.7e-67) {
tmp = t_1;
} else if (z <= 5.4e+77) {
tmp = fma(fma(-x, t, (i * b)), a, ((j * t) * c));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(fma(Float64(-c), z, Float64(i * a)), b, Float64(Float64(y * x) * z)) tmp = 0.0 if (z <= -3.7e-67) tmp = t_1; elseif (z <= 5.4e+77) tmp = fma(fma(Float64(-x), t, Float64(i * b)), a, Float64(Float64(j * t) * c)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e-67], t$95$1, If[LessEqual[z, 5.4e+77], N[(N[((-x) * t + N[(i * b), $MachinePrecision]), $MachinePrecision] * a + N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \left(y \cdot x\right) \cdot z\right)\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{-67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{+77}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-x, t, i \cdot b\right), a, \left(j \cdot t\right) \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.6999999999999999e-67 or 5.3999999999999997e77 < z Initial program 70.0%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites66.3%
Taylor expanded in j around 0
Applied rewrites70.0%
if -3.6999999999999999e-67 < z < 5.3999999999999997e77Initial program 82.0%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites74.2%
Taylor expanded in i around 0
Applied rewrites67.1%
Final simplification68.6%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -7.6e+57)
(* (fma (- x) a (* j c)) t)
(if (<= t 9e+102)
(fma (fma (- c) z (* i a)) b (* (* y x) z))
(* (fma i b (* (- t) x)) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -7.6e+57) {
tmp = fma(-x, a, (j * c)) * t;
} else if (t <= 9e+102) {
tmp = fma(fma(-c, z, (i * a)), b, ((y * x) * z));
} else {
tmp = fma(i, b, (-t * x)) * a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -7.6e+57) tmp = Float64(fma(Float64(-x), a, Float64(j * c)) * t); elseif (t <= 9e+102) tmp = fma(fma(Float64(-c), z, Float64(i * a)), b, Float64(Float64(y * x) * z)); else tmp = Float64(fma(i, b, Float64(Float64(-t) * x)) * a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -7.6e+57], N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[t, 9e+102], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b + N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(i * b + N[((-t) * x), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.6 \cdot 10^{+57}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+102}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-c, z, i \cdot a\right), b, \left(y \cdot x\right) \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, b, \left(-t\right) \cdot x\right) \cdot a\\
\end{array}
\end{array}
if t < -7.5999999999999997e57Initial program 67.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6470.1
Applied rewrites70.1%
if -7.5999999999999997e57 < t < 9.00000000000000042e102Initial program 82.9%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites68.4%
Taylor expanded in j around 0
Applied rewrites63.8%
if 9.00000000000000042e102 < t Initial program 63.8%
Applied rewrites68.3%
Taylor expanded in a around inf
*-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.2
Applied rewrites66.2%
Applied rewrites66.3%
Final simplification65.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- t) x) a)))
(if (<= x -5.4e+213)
(* (* y x) z)
(if (<= x -6.2e-64)
t_1
(if (<= x -2.4e-224)
(* (* (- z) c) b)
(if (<= x 2.65e-20) (* (* i b) a) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-t * x) * a;
double tmp;
if (x <= -5.4e+213) {
tmp = (y * x) * z;
} else if (x <= -6.2e-64) {
tmp = t_1;
} else if (x <= -2.4e-224) {
tmp = (-z * c) * b;
} else if (x <= 2.65e-20) {
tmp = (i * b) * 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 = (-t * x) * a
if (x <= (-5.4d+213)) then
tmp = (y * x) * z
else if (x <= (-6.2d-64)) then
tmp = t_1
else if (x <= (-2.4d-224)) then
tmp = (-z * c) * b
else if (x <= 2.65d-20) then
tmp = (i * b) * 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 = (-t * x) * a;
double tmp;
if (x <= -5.4e+213) {
tmp = (y * x) * z;
} else if (x <= -6.2e-64) {
tmp = t_1;
} else if (x <= -2.4e-224) {
tmp = (-z * c) * b;
} else if (x <= 2.65e-20) {
tmp = (i * b) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-t * x) * a tmp = 0 if x <= -5.4e+213: tmp = (y * x) * z elif x <= -6.2e-64: tmp = t_1 elif x <= -2.4e-224: tmp = (-z * c) * b elif x <= 2.65e-20: tmp = (i * b) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-t) * x) * a) tmp = 0.0 if (x <= -5.4e+213) tmp = Float64(Float64(y * x) * z); elseif (x <= -6.2e-64) tmp = t_1; elseif (x <= -2.4e-224) tmp = Float64(Float64(Float64(-z) * c) * b); elseif (x <= 2.65e-20) tmp = Float64(Float64(i * b) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-t * x) * a; tmp = 0.0; if (x <= -5.4e+213) tmp = (y * x) * z; elseif (x <= -6.2e-64) tmp = t_1; elseif (x <= -2.4e-224) tmp = (-z * c) * b; elseif (x <= 2.65e-20) tmp = (i * b) * 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[((-t) * x), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[x, -5.4e+213], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, -6.2e-64], t$95$1, If[LessEqual[x, -2.4e-224], N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 2.65e-20], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{if}\;x \leq -5.4 \cdot 10^{+213}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-224}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{-20}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.4000000000000002e213Initial program 75.5%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites56.9%
Taylor expanded in x around inf
Applied rewrites61.5%
if -5.4000000000000002e213 < x < -6.20000000000000049e-64 or 2.6500000000000001e-20 < x Initial program 74.3%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites51.9%
Taylor expanded in x around inf
Applied rewrites36.5%
if -6.20000000000000049e-64 < x < -2.40000000000000014e-224Initial program 68.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.3
Applied rewrites53.3%
Taylor expanded in b around inf
Applied rewrites34.3%
if -2.40000000000000014e-224 < x < 2.6500000000000001e-20Initial program 83.0%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites70.7%
Taylor expanded in b around inf
Applied rewrites41.1%
Final simplification39.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- t) a (* z y)) x)))
(if (<= x -2.4e+90)
t_1
(if (<= x 1.65e-161)
(* (fma (- c) z (* i a)) b)
(if (<= x 2e+20) (* (fma t j (* (- b) z)) c) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (z * y)) * x;
double tmp;
if (x <= -2.4e+90) {
tmp = t_1;
} else if (x <= 1.65e-161) {
tmp = fma(-c, z, (i * a)) * b;
} else if (x <= 2e+20) {
tmp = fma(t, j, (-b * z)) * c;
} 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 <= -2.4e+90) tmp = t_1; elseif (x <= 1.65e-161) tmp = Float64(fma(Float64(-c), z, Float64(i * a)) * b); elseif (x <= 2e+20) tmp = Float64(fma(t, j, Float64(Float64(-b) * z)) * c); 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, -2.4e+90], t$95$1, If[LessEqual[x, 1.65e-161], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 2e+20], N[(N[(t * j + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $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 -2.4 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{-161}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot a\right) \cdot b\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+20}:\\
\;\;\;\;\mathsf{fma}\left(t, j, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.4000000000000001e90 or 2e20 < x Initial program 74.6%
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-*.f6475.6
Applied rewrites75.6%
if -2.4000000000000001e90 < x < 1.6499999999999999e-161Initial program 78.2%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6452.2
Applied rewrites52.2%
if 1.6499999999999999e-161 < x < 2e20Initial program 73.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6458.1
Applied rewrites58.1%
Applied rewrites58.1%
Final simplification62.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- j) i (* z x)) y)))
(if (<= y -3.2e+34)
t_1
(if (<= y 1.3e-238)
(* (fma t j (* (- b) z)) c)
(if (<= y 8.8e+109) (* (fma (- c) z (* i a)) 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(-j, i, (z * x)) * y;
double tmp;
if (y <= -3.2e+34) {
tmp = t_1;
} else if (y <= 1.3e-238) {
tmp = fma(t, j, (-b * z)) * c;
} else if (y <= 8.8e+109) {
tmp = fma(-c, z, (i * a)) * b;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-j), i, Float64(z * x)) * y) tmp = 0.0 if (y <= -3.2e+34) tmp = t_1; elseif (y <= 1.3e-238) tmp = Float64(fma(t, j, Float64(Float64(-b) * z)) * c); elseif (y <= 8.8e+109) tmp = Float64(fma(Float64(-c), z, Float64(i * a)) * 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[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -3.2e+34], t$95$1, If[LessEqual[y, 1.3e-238], N[(N[(t * j + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[y, 8.8e+109], N[(N[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -3.2 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-238}:\\
\;\;\;\;\mathsf{fma}\left(t, j, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+109}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.1999999999999998e34 or 8.7999999999999997e109 < y Initial program 64.4%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6464.5
Applied rewrites64.5%
if -3.1999999999999998e34 < y < 1.3000000000000001e-238Initial program 81.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6449.1
Applied rewrites49.1%
Applied rewrites49.1%
if 1.3000000000000001e-238 < y < 8.7999999999999997e109Initial program 84.4%
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
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6452.8
Applied rewrites52.8%
Final simplification55.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- c) z (* i a)) b)))
(if (<= b -4.1e-16)
t_1
(if (<= b -5.4e-176)
(* (* (- t) x) a)
(if (<= b 2.1e+88) (* (fma (- i) y (* c t)) 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(-c, z, (i * a)) * b;
double tmp;
if (b <= -4.1e-16) {
tmp = t_1;
} else if (b <= -5.4e-176) {
tmp = (-t * x) * a;
} else if (b <= 2.1e+88) {
tmp = fma(-i, y, (c * t)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-c), z, Float64(i * a)) * b) tmp = 0.0 if (b <= -4.1e-16) tmp = t_1; elseif (b <= -5.4e-176) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (b <= 2.1e+88) tmp = Float64(fma(Float64(-i), y, Float64(c * t)) * 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[((-c) * z + N[(i * a), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -4.1e-16], t$95$1, If[LessEqual[b, -5.4e-176], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[b, 2.1e+88], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-c, z, i \cdot a\right) \cdot b\\
\mathbf{if}\;b \leq -4.1 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -5.4 \cdot 10^{-176}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{+88}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -4.10000000000000006e-16 or 2.1e88 < b Initial program 77.6%
Taylor expanded in b around inf
*-commutativeN/A
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
distribute-lft-neg-inN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6469.2
Applied rewrites69.2%
if -4.10000000000000006e-16 < b < -5.3999999999999997e-176Initial program 69.1%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites59.5%
Taylor expanded in x around inf
Applied rewrites44.7%
if -5.3999999999999997e-176 < b < 2.1e88Initial program 76.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-*.f6446.3
Applied rewrites46.3%
Final simplification55.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma t j (* (- b) z)) c)))
(if (<= c -1.4e-22)
t_1
(if (<= c 5.8e-258)
(* (* y x) z)
(if (<= c 3.3e-38) (* (* (- t) x) a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(t, j, (-b * z)) * c;
double tmp;
if (c <= -1.4e-22) {
tmp = t_1;
} else if (c <= 5.8e-258) {
tmp = (y * x) * z;
} else if (c <= 3.3e-38) {
tmp = (-t * x) * a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(t, j, Float64(Float64(-b) * z)) * c) tmp = 0.0 if (c <= -1.4e-22) tmp = t_1; elseif (c <= 5.8e-258) tmp = Float64(Float64(y * x) * z); elseif (c <= 3.3e-38) tmp = Float64(Float64(Float64(-t) * x) * a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(t * j + N[((-b) * z), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -1.4e-22], t$95$1, If[LessEqual[c, 5.8e-258], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 3.3e-38], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(t, j, \left(-b\right) \cdot z\right) \cdot c\\
\mathbf{if}\;c \leq -1.4 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 5.8 \cdot 10^{-258}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;c \leq 3.3 \cdot 10^{-38}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -1.39999999999999997e-22 or 3.3000000000000002e-38 < c Initial program 69.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6457.0
Applied rewrites57.0%
Applied rewrites58.5%
if -1.39999999999999997e-22 < c < 5.7999999999999999e-258Initial program 82.1%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites63.1%
Taylor expanded in x around inf
Applied rewrites31.8%
if 5.7999999999999999e-258 < c < 3.3000000000000002e-38Initial program 82.4%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites70.8%
Taylor expanded in x around inf
Applied rewrites42.7%
Final simplification47.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -2e+83)
(* (* y x) z)
(if (<= x -2.4e-224)
(* (* (- z) c) b)
(if (<= x 2.76e-14) (* (* i b) a) (* (* z y) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+83) {
tmp = (y * x) * z;
} else if (x <= -2.4e-224) {
tmp = (-z * c) * b;
} else if (x <= 2.76e-14) {
tmp = (i * b) * a;
} else {
tmp = (z * y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2d+83)) then
tmp = (y * x) * z
else if (x <= (-2.4d-224)) then
tmp = (-z * c) * b
else if (x <= 2.76d-14) then
tmp = (i * b) * a
else
tmp = (z * y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2e+83) {
tmp = (y * x) * z;
} else if (x <= -2.4e-224) {
tmp = (-z * c) * b;
} else if (x <= 2.76e-14) {
tmp = (i * b) * a;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2e+83: tmp = (y * x) * z elif x <= -2.4e-224: tmp = (-z * c) * b elif x <= 2.76e-14: tmp = (i * b) * a else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2e+83) tmp = Float64(Float64(y * x) * z); elseif (x <= -2.4e-224) tmp = Float64(Float64(Float64(-z) * c) * b); elseif (x <= 2.76e-14) tmp = Float64(Float64(i * b) * a); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2e+83) tmp = (y * x) * z; elseif (x <= -2.4e-224) tmp = (-z * c) * b; elseif (x <= 2.76e-14) tmp = (i * b) * a; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2e+83], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, -2.4e-224], N[(N[((-z) * c), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[x, 2.76e-14], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+83}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-224}:\\
\;\;\;\;\left(\left(-z\right) \cdot c\right) \cdot b\\
\mathbf{elif}\;x \leq 2.76 \cdot 10^{-14}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if x < -2.00000000000000006e83Initial program 80.6%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites37.3%
Taylor expanded in x around inf
Applied rewrites42.8%
if -2.00000000000000006e83 < x < -2.40000000000000014e-224Initial program 73.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6446.5
Applied rewrites46.5%
Taylor expanded in b around inf
Applied rewrites28.9%
if -2.40000000000000014e-224 < x < 2.76000000000000004e-14Initial program 82.2%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites70.3%
Taylor expanded in b around inf
Applied rewrites40.1%
if 2.76000000000000004e-14 < x Initial program 67.9%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites49.2%
Taylor expanded in x around inf
Applied rewrites35.5%
Taylor expanded in x around inf
Applied rewrites36.9%
Final simplification36.9%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= x -2.9e+101) (* (* y x) z) (if (<= x 2.76e-14) (* (* i b) a) (* (* z y) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2.9e+101) {
tmp = (y * x) * z;
} else if (x <= 2.76e-14) {
tmp = (i * b) * a;
} else {
tmp = (z * y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2.9d+101)) then
tmp = (y * x) * z
else if (x <= 2.76d-14) then
tmp = (i * b) * a
else
tmp = (z * y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2.9e+101) {
tmp = (y * x) * z;
} else if (x <= 2.76e-14) {
tmp = (i * b) * a;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2.9e+101: tmp = (y * x) * z elif x <= 2.76e-14: tmp = (i * b) * a else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2.9e+101) tmp = Float64(Float64(y * x) * z); elseif (x <= 2.76e-14) tmp = Float64(Float64(i * b) * a); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2.9e+101) tmp = (y * x) * z; elseif (x <= 2.76e-14) tmp = (i * b) * a; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2.9e+101], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 2.76e-14], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+101}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq 2.76 \cdot 10^{-14}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if x < -2.89999999999999987e101Initial program 79.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites39.8%
Taylor expanded in x around inf
Applied rewrites45.7%
if -2.89999999999999987e101 < x < 2.76000000000000004e-14Initial program 78.8%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites66.4%
Taylor expanded in b around inf
Applied rewrites31.2%
if 2.76000000000000004e-14 < x Initial program 67.9%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites49.2%
Taylor expanded in x around inf
Applied rewrites35.5%
Taylor expanded in x around inf
Applied rewrites36.9%
Final simplification35.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= x -2.9e+101) (* (* y x) z) (if (<= x 2.76e-14) (* (* i a) b) (* (* z y) x))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2.9e+101) {
tmp = (y * x) * z;
} else if (x <= 2.76e-14) {
tmp = (i * a) * b;
} else {
tmp = (z * y) * x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (x <= (-2.9d+101)) then
tmp = (y * x) * z
else if (x <= 2.76d-14) then
tmp = (i * a) * b
else
tmp = (z * y) * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -2.9e+101) {
tmp = (y * x) * z;
} else if (x <= 2.76e-14) {
tmp = (i * a) * b;
} else {
tmp = (z * y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if x <= -2.9e+101: tmp = (y * x) * z elif x <= 2.76e-14: tmp = (i * a) * b else: tmp = (z * y) * x return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -2.9e+101) tmp = Float64(Float64(y * x) * z); elseif (x <= 2.76e-14) tmp = Float64(Float64(i * a) * b); else tmp = Float64(Float64(z * y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (x <= -2.9e+101) tmp = (y * x) * z; elseif (x <= 2.76e-14) tmp = (i * a) * b; else tmp = (z * y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -2.9e+101], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 2.76e-14], N[(N[(i * a), $MachinePrecision] * b), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+101}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq 2.76 \cdot 10^{-14}:\\
\;\;\;\;\left(i \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\end{array}
\end{array}
if x < -2.89999999999999987e101Initial program 79.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites39.8%
Taylor expanded in x around inf
Applied rewrites45.7%
if -2.89999999999999987e101 < x < 2.76000000000000004e-14Initial program 78.8%
Taylor expanded in z around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
cancel-sign-subN/A
associate-*r*N/A
mul-1-negN/A
distribute-lft-out--N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-out--N/A
+-commutativeN/A
Applied rewrites66.4%
Taylor expanded in b around inf
Applied rewrites31.2%
Applied rewrites30.6%
if 2.76000000000000004e-14 < x Initial program 67.9%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites49.2%
Taylor expanded in x around inf
Applied rewrites35.5%
Taylor expanded in x around inf
Applied rewrites36.9%
Final simplification34.8%
(FPCore (x y z t a b c i j) :precision binary64 (* (* y x) z))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (y * x) * z;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = (y * x) * z
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (y * x) * z;
}
def code(x, y, z, t, a, b, c, i, j): return (y * x) * z
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(y * x) * z) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (y * x) * z; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision]
\begin{array}{l}
\\
\left(y \cdot x\right) \cdot z
\end{array}
Initial program 76.0%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
Applied rewrites57.5%
Taylor expanded in x around inf
Applied rewrites22.2%
Final simplification22.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(/
(* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
(+ (* c t) (* i y)))))
(t_2
(-
(* x (- (* z y) (* a t)))
(- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
(if (< t -8.120978919195912e-33)
t_2
(if (< t -4.712553818218485e-169)
t_1
(if (< t -7.633533346031584e-308)
t_2
(if (< t 1.0535888557455487e-139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
if (t < (-8.120978919195912d-33)) then
tmp = t_2
else if (t < (-4.712553818218485d-169)) then
tmp = t_1
else if (t < (-7.633533346031584d-308)) then
tmp = t_2
else if (t < 1.0535888557455487d-139) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y))) t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)) tmp = 0 if t < -8.120978919195912e-33: tmp = t_2 elif t < -4.712553818218485e-169: tmp = t_1 elif t < -7.633533346031584e-308: tmp = t_2 elif t < 1.0535888557455487e-139: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y)))) t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j))) tmp = 0.0 if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y))); t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)); tmp = 0.0; if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024235
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))