
(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 (<=
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))
INFINITY)
(fma
(fma (- t) a (* z y))
x
(fma (- b) (fma (- t) i (* c z)) (* (fma (- y) i (* c a)) j)))
(*
(fma
(- i)
y
(fma c a (/ (fma (fma (- b) c (* y x)) z (* (fma (- x) a (* i b)) t)) j)))
j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= ((double) INFINITY)) {
tmp = fma(fma(-t, a, (z * y)), x, fma(-b, fma(-t, i, (c * z)), (fma(-y, i, (c * a)) * j)));
} else {
tmp = fma(-i, y, fma(c, a, (fma(fma(-b, c, (y * x)), z, (fma(-x, a, (i * b)) * t)) / j))) * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) <= Inf) tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, fma(Float64(-b), fma(Float64(-t), i, Float64(c * z)), Float64(fma(Float64(-y), i, Float64(c * a)) * j))); else tmp = Float64(fma(Float64(-i), y, fma(c, a, Float64(fma(fma(Float64(-b), c, Float64(y * x)), z, Float64(fma(Float64(-x), a, Float64(i * b)) * t)) / j))) * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[((-b) * N[((-t) * i + N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a + N[(N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \mathsf{fma}\left(-b, \mathsf{fma}\left(-t, i, c \cdot z\right), \mathsf{fma}\left(-y, i, c \cdot a\right) \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, \mathsf{fma}\left(c, a, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-b, c, y \cdot x\right), z, \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\right)}{j}\right)\right) \cdot j\\
\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 94.3%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites94.3%
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 t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites40.1%
Taylor expanded in j around inf
Applied rewrites68.3%
Final simplification89.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<=
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i))))
(* j (- (* c a) (* y i))))
INFINITY)
(fma
(fma (- t) a (* z y))
x
(fma (- b) (fma (- t) i (* c z)) (* (fma (- y) i (* c a)) j)))
(fma (fma (- b) c (* x y)) z (* (fma (- x) a (* b i)) t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))) <= ((double) INFINITY)) {
tmp = fma(fma(-t, a, (z * y)), x, fma(-b, fma(-t, i, (c * z)), (fma(-y, i, (c * a)) * j)));
} else {
tmp = fma(fma(-b, c, (x * y)), z, (fma(-x, a, (b * i)) * t));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) <= Inf) tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, fma(Float64(-b), fma(Float64(-t), i, Float64(c * z)), Float64(fma(Float64(-y), i, Float64(c * a)) * j))); else tmp = fma(fma(Float64(-b), c, Float64(x * y)), z, Float64(fma(Float64(-x), a, Float64(b * i)) * t)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[((-b) * N[((-t) * i + N[(c * z), $MachinePrecision]), $MachinePrecision] + N[(N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[((-b) * c + N[(x * y), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(b * i), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right) \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \mathsf{fma}\left(-b, \mathsf{fma}\left(-t, i, c \cdot z\right), \mathsf{fma}\left(-y, i, c \cdot a\right) \cdot j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, x \cdot y\right), z, \mathsf{fma}\left(-x, a, b \cdot i\right) \cdot t\right)\\
\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 94.3%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites94.3%
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 t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites40.1%
Taylor expanded in j around inf
Applied rewrites68.3%
Taylor expanded in t around inf
Applied rewrites51.2%
Taylor expanded in j around 0
Applied rewrites64.1%
Final simplification88.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (or (<= x -2.1e+137) (not (<= x 3.3e+126)))
(fma (fma (- t) a (* z y)) x (* (fma (- c) z (* i t)) b))
(fma
(fma (- i) y (* c a))
j
(fma (fma (- a) x (* i b)) t (* (fma (- b) c (* y x)) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((x <= -2.1e+137) || !(x <= 3.3e+126)) {
tmp = fma(fma(-t, a, (z * y)), x, (fma(-c, z, (i * t)) * b));
} else {
tmp = fma(fma(-i, y, (c * a)), j, fma(fma(-a, x, (i * b)), t, (fma(-b, c, (y * x)) * z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((x <= -2.1e+137) || !(x <= 3.3e+126)) tmp = fma(fma(Float64(-t), a, Float64(z * y)), x, Float64(fma(Float64(-c), z, Float64(i * t)) * b)); else tmp = fma(fma(Float64(-i), y, Float64(c * a)), j, fma(fma(Float64(-a), x, Float64(i * b)), t, Float64(fma(Float64(-b), c, Float64(y * x)) * z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[x, -2.1e+137], N[Not[LessEqual[x, 3.3e+126]], $MachinePrecision]], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x + N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.1 \cdot 10^{+137} \lor \neg \left(x \leq 3.3 \cdot 10^{+126}\right):\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-t, a, z \cdot y\right), x, \mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-i, y, c \cdot a\right), j, \mathsf{fma}\left(\mathsf{fma}\left(-a, x, i \cdot b\right), t, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\right)\\
\end{array}
\end{array}
if x < -2.0999999999999999e137 or 3.30000000000000013e126 < x Initial program 73.5%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites83.8%
Taylor expanded in b around inf
mul-1-negN/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites85.9%
if -2.0999999999999999e137 < x < 3.30000000000000013e126Initial program 76.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites87.1%
Final simplification86.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- i) y (* c a)))
(t_2 (fma t_1 j (* (fma (- b) c (* y x)) z))))
(if (<= j -2.4e-88)
t_2
(if (<= j 1.4e+37)
(fma (fma (- b) c (* x y)) z (* (fma (- x) a (* b i)) t))
(if (<= j 1.35e+133) t_2 (* t_1 j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, y, (c * a));
double t_2 = fma(t_1, j, (fma(-b, c, (y * x)) * z));
double tmp;
if (j <= -2.4e-88) {
tmp = t_2;
} else if (j <= 1.4e+37) {
tmp = fma(fma(-b, c, (x * y)), z, (fma(-x, a, (b * i)) * t));
} else if (j <= 1.35e+133) {
tmp = t_2;
} else {
tmp = t_1 * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-i), y, Float64(c * a)) t_2 = fma(t_1, j, Float64(fma(Float64(-b), c, Float64(y * x)) * z)) tmp = 0.0 if (j <= -2.4e-88) tmp = t_2; elseif (j <= 1.4e+37) tmp = fma(fma(Float64(-b), c, Float64(x * y)), z, Float64(fma(Float64(-x), a, Float64(b * i)) * t)); elseif (j <= 1.35e+133) tmp = t_2; else tmp = Float64(t_1 * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * j + N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.4e-88], t$95$2, If[LessEqual[j, 1.4e+37], N[(N[((-b) * c + N[(x * y), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(b * i), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.35e+133], t$95$2, N[(t$95$1 * j), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, y, c \cdot a\right)\\
t_2 := \mathsf{fma}\left(t\_1, j, \mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\right)\\
\mathbf{if}\;j \leq -2.4 \cdot 10^{-88}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq 1.4 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, x \cdot y\right), z, \mathsf{fma}\left(-x, a, b \cdot i\right) \cdot t\right)\\
\mathbf{elif}\;j \leq 1.35 \cdot 10^{+133}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 \cdot j\\
\end{array}
\end{array}
if j < -2.4e-88 or 1.3999999999999999e37 < j < 1.3500000000000001e133Initial program 83.9%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites71.2%
if -2.4e-88 < j < 1.3999999999999999e37Initial program 69.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites82.1%
Taylor expanded in j around inf
Applied rewrites69.4%
Taylor expanded in t around inf
Applied rewrites41.1%
Taylor expanded in j around 0
Applied rewrites85.9%
if 1.3500000000000001e133 < j Initial program 69.6%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites60.9%
Taylor expanded in j around inf
Applied rewrites70.0%
Taylor expanded in j around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6476.5
Applied rewrites76.5%
Final simplification78.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- t) a (* z y))))
(if (<= b -1.8e-21)
(fma (fma (- b) c (* x y)) z (* (fma (- x) a (* b i)) t))
(if (<= b 2.05e-16)
(fma t_1 x (* (fma (- i) y (* c a)) j))
(fma t_1 x (* (fma (- c) z (* i t)) b))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-t, a, (z * y));
double tmp;
if (b <= -1.8e-21) {
tmp = fma(fma(-b, c, (x * y)), z, (fma(-x, a, (b * i)) * t));
} else if (b <= 2.05e-16) {
tmp = fma(t_1, x, (fma(-i, y, (c * a)) * j));
} else {
tmp = fma(t_1, x, (fma(-c, z, (i * t)) * b));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-t), a, Float64(z * y)) tmp = 0.0 if (b <= -1.8e-21) tmp = fma(fma(Float64(-b), c, Float64(x * y)), z, Float64(fma(Float64(-x), a, Float64(b * i)) * t)); elseif (b <= 2.05e-16) tmp = fma(t_1, x, Float64(fma(Float64(-i), y, Float64(c * a)) * j)); else tmp = fma(t_1, x, Float64(fma(Float64(-c), z, Float64(i * t)) * b)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.8e-21], N[(N[((-b) * c + N[(x * y), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(b * i), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.05e-16], N[(t$95$1 * x + N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(t$95$1 * x + N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-t, a, z \cdot y\right)\\
\mathbf{if}\;b \leq -1.8 \cdot 10^{-21}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, x \cdot y\right), z, \mathsf{fma}\left(-x, a, b \cdot i\right) \cdot t\right)\\
\mathbf{elif}\;b \leq 2.05 \cdot 10^{-16}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, x, \mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\right)\\
\end{array}
\end{array}
if b < -1.79999999999999995e-21Initial program 64.8%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites77.4%
Taylor expanded in j around inf
Applied rewrites78.2%
Taylor expanded in t around inf
Applied rewrites41.7%
Taylor expanded in j around 0
Applied rewrites77.6%
if -1.79999999999999995e-21 < b < 2.05000000000000003e-16Initial program 81.8%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites81.8%
Taylor expanded in b around 0
*-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6477.3
Applied rewrites77.3%
if 2.05000000000000003e-16 < b Initial program 75.1%
lift-+.f64N/A
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-+l+N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites79.6%
Taylor expanded in b around inf
mul-1-negN/A
*-commutativeN/A
+-commutativeN/A
associate-*r*N/A
mul-1-negN/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
mul-1-negN/A
lower-*.f64N/A
Applied rewrites83.6%
Final simplification79.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -4.1e+188)
(fma (fma (- y) i (* c a)) j (* (* z x) y))
(if (<= j 2.95e+53)
(fma (fma (- b) c (* x y)) z (* (fma (- x) a (* b i)) t))
(* (fma (- i) y (* c a)) j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -4.1e+188) {
tmp = fma(fma(-y, i, (c * a)), j, ((z * x) * y));
} else if (j <= 2.95e+53) {
tmp = fma(fma(-b, c, (x * y)), z, (fma(-x, a, (b * i)) * t));
} else {
tmp = fma(-i, y, (c * a)) * j;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -4.1e+188) tmp = fma(fma(Float64(-y), i, Float64(c * a)), j, Float64(Float64(z * x) * y)); elseif (j <= 2.95e+53) tmp = fma(fma(Float64(-b), c, Float64(x * y)), z, Float64(fma(Float64(-x), a, Float64(b * i)) * t)); else tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -4.1e+188], N[(N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.95e+53], N[(N[((-b) * c + N[(x * y), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-x) * a + N[(b * i), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -4.1 \cdot 10^{+188}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot a\right), j, \left(z \cdot x\right) \cdot y\right)\\
\mathbf{elif}\;j \leq 2.95 \cdot 10^{+53}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, c, x \cdot y\right), z, \mathsf{fma}\left(-x, a, b \cdot i\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if j < -4.1e188Initial program 93.0%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6474.1
Applied rewrites74.1%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6474.1
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
+-commutativeN/A
lift-fma.f6474.1
Applied rewrites74.1%
if -4.1e188 < j < 2.9499999999999999e53Initial program 73.6%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites81.3%
Taylor expanded in j around inf
Applied rewrites73.9%
Taylor expanded in t around inf
Applied rewrites41.4%
Taylor expanded in j around 0
Applied rewrites75.4%
if 2.9499999999999999e53 < j Initial program 73.9%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites72.1%
Taylor expanded in j around inf
Applied rewrites78.0%
Taylor expanded in j around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6470.0
Applied rewrites70.0%
Final simplification74.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- i) y (* c a)) j)))
(if (<= j -1.26e+188)
t_1
(if (<= j -5.8e+65)
(* (fma (- x) t (* j c)) a)
(if (<= j -2.6e-50)
(* (fma y x (* (- b) c)) z)
(if (or (<= j -3.5e-87) (not (<= j 4.7e+51)))
t_1
(* (fma (- a) x (* i b)) t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-i, y, (c * a)) * j;
double tmp;
if (j <= -1.26e+188) {
tmp = t_1;
} else if (j <= -5.8e+65) {
tmp = fma(-x, t, (j * c)) * a;
} else if (j <= -2.6e-50) {
tmp = fma(y, x, (-b * c)) * z;
} else if ((j <= -3.5e-87) || !(j <= 4.7e+51)) {
tmp = t_1;
} else {
tmp = fma(-a, x, (i * b)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-i), y, Float64(c * a)) * j) tmp = 0.0 if (j <= -1.26e+188) tmp = t_1; elseif (j <= -5.8e+65) tmp = Float64(fma(Float64(-x), t, Float64(j * c)) * a); elseif (j <= -2.6e-50) tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z); elseif ((j <= -3.5e-87) || !(j <= 4.7e+51)) tmp = t_1; else tmp = Float64(fma(Float64(-a), x, Float64(i * b)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -1.26e+188], t$95$1, If[LessEqual[j, -5.8e+65], N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[j, -2.6e-50], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[Or[LessEqual[j, -3.5e-87], N[Not[LessEqual[j, 4.7e+51]], $MachinePrecision]], t$95$1, N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{if}\;j \leq -1.26 \cdot 10^{+188}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -5.8 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
\mathbf{elif}\;j \leq -2.6 \cdot 10^{-50}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;j \leq -3.5 \cdot 10^{-87} \lor \neg \left(j \leq 4.7 \cdot 10^{+51}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\end{array}
\end{array}
if j < -1.26000000000000001e188 or -2.6000000000000001e-50 < j < -3.50000000000000012e-87 or 4.7000000000000002e51 < j Initial program 82.0%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites75.5%
Taylor expanded in j around inf
Applied rewrites78.9%
Taylor expanded in j around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6470.3
Applied rewrites70.3%
if -1.26000000000000001e188 < j < -5.8000000000000001e65Initial program 74.0%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6471.8
Applied rewrites71.8%
if -5.8000000000000001e65 < j < -2.6000000000000001e-50Initial program 83.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.7
Applied rewrites66.7%
Applied rewrites66.7%
if -3.50000000000000012e-87 < j < 4.7000000000000002e51Initial program 70.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.7
Applied rewrites53.7%
Final simplification62.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) x (* i b)) t)) (t_2 (* (fma (- i) y (* c a)) j)))
(if (<= j -3.4e+179)
t_2
(if (<= j -1.2e+16)
t_1
(if (<= j -2.6e-50)
(* (fma y x (* (- b) c)) z)
(if (or (<= j -3.5e-87) (not (<= j 4.7e+51))) 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(-a, x, (i * b)) * t;
double t_2 = fma(-i, y, (c * a)) * j;
double tmp;
if (j <= -3.4e+179) {
tmp = t_2;
} else if (j <= -1.2e+16) {
tmp = t_1;
} else if (j <= -2.6e-50) {
tmp = fma(y, x, (-b * c)) * z;
} else if ((j <= -3.5e-87) || !(j <= 4.7e+51)) {
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(-a), x, Float64(i * b)) * t) t_2 = Float64(fma(Float64(-i), y, Float64(c * a)) * j) tmp = 0.0 if (j <= -3.4e+179) tmp = t_2; elseif (j <= -1.2e+16) tmp = t_1; elseif (j <= -2.6e-50) tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z); elseif ((j <= -3.5e-87) || !(j <= 4.7e+51)) 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[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]}, If[LessEqual[j, -3.4e+179], t$95$2, If[LessEqual[j, -1.2e+16], t$95$1, If[LessEqual[j, -2.6e-50], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[Or[LessEqual[j, -3.5e-87], N[Not[LessEqual[j, 4.7e+51]], $MachinePrecision]], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
t_2 := \mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{if}\;j \leq -3.4 \cdot 10^{+179}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -1.2 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -2.6 \cdot 10^{-50}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{elif}\;j \leq -3.5 \cdot 10^{-87} \lor \neg \left(j \leq 4.7 \cdot 10^{+51}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -3.39999999999999996e179 or -2.6000000000000001e-50 < j < -3.50000000000000012e-87 or 4.7000000000000002e51 < j Initial program 82.4%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites76.1%
Taylor expanded in j around inf
Applied rewrites79.3%
Taylor expanded in j around inf
*-commutativeN/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
lower-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6469.9
Applied rewrites69.9%
if -3.39999999999999996e179 < j < -1.2e16 or -3.50000000000000012e-87 < j < 4.7000000000000002e51Initial program 70.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.7
Applied rewrites55.7%
if -1.2e16 < j < -2.6000000000000001e-50Initial program 93.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6469.3
Applied rewrites69.3%
Applied rewrites69.3%
Final simplification61.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- z) b (* j a)) c)))
(if (<= c -6.4e+114)
t_1
(if (<= c -1.75e-53)
(* (fma (- t) a (* z y)) x)
(if (<= c -1.85e-166)
(* (fma (- y) j (* b t)) i)
(if (<= c -6e-264)
(* (fma (- a) x (* i b)) t)
(if (<= c 1.42e-31) (* (fma (- i) j (* z x)) y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-z, b, (j * a)) * c;
double tmp;
if (c <= -6.4e+114) {
tmp = t_1;
} else if (c <= -1.75e-53) {
tmp = fma(-t, a, (z * y)) * x;
} else if (c <= -1.85e-166) {
tmp = fma(-y, j, (b * t)) * i;
} else if (c <= -6e-264) {
tmp = fma(-a, x, (i * b)) * t;
} else if (c <= 1.42e-31) {
tmp = fma(-i, j, (z * x)) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-z), b, Float64(j * a)) * c) tmp = 0.0 if (c <= -6.4e+114) tmp = t_1; elseif (c <= -1.75e-53) tmp = Float64(fma(Float64(-t), a, Float64(z * y)) * x); elseif (c <= -1.85e-166) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); elseif (c <= -6e-264) tmp = Float64(fma(Float64(-a), x, Float64(i * b)) * t); elseif (c <= 1.42e-31) tmp = Float64(fma(Float64(-i), j, Float64(z * x)) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-z) * b + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -6.4e+114], t$95$1, If[LessEqual[c, -1.75e-53], N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[c, -1.85e-166], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[c, -6e-264], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[c, 1.42e-31], N[(N[((-i) * j + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-z, b, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -6.4 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -1.75 \cdot 10^{-53}:\\
\;\;\;\;\mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\\
\mathbf{elif}\;c \leq -1.85 \cdot 10^{-166}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{elif}\;c \leq -6 \cdot 10^{-264}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\mathbf{elif}\;c \leq 1.42 \cdot 10^{-31}:\\
\;\;\;\;\mathsf{fma}\left(-i, j, z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -6.4e114 or 1.4200000000000001e-31 < c Initial program 73.7%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/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-*.f6470.1
Applied rewrites70.1%
if -6.4e114 < c < -1.74999999999999997e-53Initial program 75.5%
Taylor expanded in t around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
associate--l+N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-out--N/A
Applied rewrites87.6%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
mul-1-negN/A
associate-*r*N/A
+-commutativeN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6458.7
Applied rewrites58.7%
if -1.74999999999999997e-53 < c < -1.8500000000000001e-166Initial program 71.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6476.5
Applied rewrites76.5%
if -1.8500000000000001e-166 < c < -6.0000000000000001e-264Initial program 95.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6484.9
Applied rewrites84.9%
if -6.0000000000000001e-264 < c < 1.4200000000000001e-31Initial program 74.7%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.8
Applied rewrites54.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -2.4e-20) (not (<= b 225000000000.0))) (* (fma (- z) c (* i t)) b) (fma (fma (- y) i (* c a)) j (* (* z x) y))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -2.4e-20) || !(b <= 225000000000.0)) {
tmp = fma(-z, c, (i * t)) * b;
} else {
tmp = fma(fma(-y, i, (c * a)), j, ((z * x) * y));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -2.4e-20) || !(b <= 225000000000.0)) tmp = Float64(fma(Float64(-z), c, Float64(i * t)) * b); else tmp = fma(fma(Float64(-y), i, Float64(c * a)), j, Float64(Float64(z * x) * y)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -2.4e-20], N[Not[LessEqual[b, 225000000000.0]], $MachinePrecision]], N[(N[((-z) * c + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], N[(N[((-y) * i + N[(c * a), $MachinePrecision]), $MachinePrecision] * j + N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.4 \cdot 10^{-20} \lor \neg \left(b \leq 225000000000\right):\\
\;\;\;\;\mathsf{fma}\left(-z, c, i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-y, i, c \cdot a\right), j, \left(z \cdot x\right) \cdot y\right)\\
\end{array}
\end{array}
if b < -2.39999999999999993e-20 or 2.25e11 < b Initial program 70.4%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
+-commutativeN/A
distribute-lft-neg-outN/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-*.f6468.5
Applied rewrites68.5%
if -2.39999999999999993e-20 < b < 2.25e11Initial program 80.8%
Taylor expanded in y around inf
*-commutativeN/A
associate-*r*N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.9
Applied rewrites62.9%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6462.9
lift--.f64N/A
lift-*.f64N/A
fp-cancel-sub-sign-invN/A
lift-neg.f64N/A
+-commutativeN/A
lift-fma.f6462.9
Applied rewrites62.9%
Final simplification65.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- b) (* c z))))
(if (<= z -1.35e-30)
t_1
(if (<= z 6.6e-221)
(* (* i b) t)
(if (<= z 1.2e-122)
(* (* j a) c)
(if (<= z 1.8e+228) (* (* (- 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 = -b * (c * z);
double tmp;
if (z <= -1.35e-30) {
tmp = t_1;
} else if (z <= 6.6e-221) {
tmp = (i * b) * t;
} else if (z <= 1.2e-122) {
tmp = (j * a) * c;
} else if (z <= 1.8e+228) {
tmp = (-t * x) * 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 = -b * (c * z)
if (z <= (-1.35d-30)) then
tmp = t_1
else if (z <= 6.6d-221) then
tmp = (i * b) * t
else if (z <= 1.2d-122) then
tmp = (j * a) * c
else if (z <= 1.8d+228) then
tmp = (-t * x) * 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 = -b * (c * z);
double tmp;
if (z <= -1.35e-30) {
tmp = t_1;
} else if (z <= 6.6e-221) {
tmp = (i * b) * t;
} else if (z <= 1.2e-122) {
tmp = (j * a) * c;
} else if (z <= 1.8e+228) {
tmp = (-t * x) * a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -b * (c * z) tmp = 0 if z <= -1.35e-30: tmp = t_1 elif z <= 6.6e-221: tmp = (i * b) * t elif z <= 1.2e-122: tmp = (j * a) * c elif z <= 1.8e+228: tmp = (-t * x) * a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-b) * Float64(c * z)) tmp = 0.0 if (z <= -1.35e-30) tmp = t_1; elseif (z <= 6.6e-221) tmp = Float64(Float64(i * b) * t); elseif (z <= 1.2e-122) tmp = Float64(Float64(j * a) * c); elseif (z <= 1.8e+228) tmp = Float64(Float64(Float64(-t) * x) * a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -b * (c * z); tmp = 0.0; if (z <= -1.35e-30) tmp = t_1; elseif (z <= 6.6e-221) tmp = (i * b) * t; elseif (z <= 1.2e-122) tmp = (j * a) * c; elseif (z <= 1.8e+228) tmp = (-t * x) * 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[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-30], t$95$1, If[LessEqual[z, 6.6e-221], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.2e-122], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[z, 1.8e+228], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-221}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-122}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+228}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.34999999999999994e-30 or 1.8e228 < z Initial program 67.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.5
Applied rewrites64.5%
Taylor expanded in x around 0
Applied rewrites53.4%
if -1.34999999999999994e-30 < z < 6.59999999999999979e-221Initial program 78.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.4
Applied rewrites52.4%
Taylor expanded in x around 0
Applied rewrites36.0%
if 6.59999999999999979e-221 < z < 1.19999999999999994e-122Initial program 89.6%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/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-*.f6447.3
Applied rewrites47.3%
Taylor expanded in z around 0
Applied rewrites42.3%
if 1.19999999999999994e-122 < z < 1.8e228Initial program 80.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.4
Applied rewrites53.4%
Taylor expanded in x around inf
Applied rewrites36.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) t (* j c)) a)))
(if (<= a -6.2e-33)
t_1
(if (<= a 1.7e-233)
(* (fma (- y) j (* b t)) i)
(if (<= a 1.6e+27) (* (fma y x (* (- b) c)) z) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-x, t, (j * c)) * a;
double tmp;
if (a <= -6.2e-33) {
tmp = t_1;
} else if (a <= 1.7e-233) {
tmp = fma(-y, j, (b * t)) * i;
} else if (a <= 1.6e+27) {
tmp = fma(y, x, (-b * c)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), t, Float64(j * c)) * a) tmp = 0.0 if (a <= -6.2e-33) tmp = t_1; elseif (a <= 1.7e-233) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); elseif (a <= 1.6e+27) tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * 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[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[a, -6.2e-33], t$95$1, If[LessEqual[a, 1.7e-233], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[a, 1.6e+27], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-233}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{+27}:\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.19999999999999994e-33 or 1.60000000000000008e27 < a Initial program 66.9%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.5
Applied rewrites67.5%
if -6.19999999999999994e-33 < a < 1.7000000000000001e-233Initial program 80.9%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6453.2
Applied rewrites53.2%
if 1.7000000000000001e-233 < a < 1.60000000000000008e27Initial program 88.2%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
Applied rewrites51.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma y x (* (- b) c)) z)))
(if (<= z -1.9e-40)
t_1
(if (<= z 3.1e-169)
(* (* i b) t)
(if (<= z 6.2e-9) (* (* (- x) a) 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(y, x, (-b * c)) * z;
double tmp;
if (z <= -1.9e-40) {
tmp = t_1;
} else if (z <= 3.1e-169) {
tmp = (i * b) * t;
} else if (z <= 6.2e-9) {
tmp = (-x * a) * t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(y, x, Float64(Float64(-b) * c)) * z) tmp = 0.0 if (z <= -1.9e-40) tmp = t_1; elseif (z <= 3.1e-169) tmp = Float64(Float64(i * b) * t); elseif (z <= 6.2e-9) tmp = Float64(Float64(Float64(-x) * a) * 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[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.9e-40], t$95$1, If[LessEqual[z, 3.1e-169], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 6.2e-9], N[(N[((-x) * a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{-40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-169}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-9}:\\
\;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.8999999999999999e-40 or 6.2000000000000001e-9 < z Initial program 70.8%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.9
Applied rewrites56.9%
Applied rewrites56.9%
if -1.8999999999999999e-40 < z < 3.1000000000000002e-169Initial program 78.8%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.7
Applied rewrites47.7%
Taylor expanded in x around 0
Applied rewrites32.5%
if 3.1000000000000002e-169 < z < 6.2000000000000001e-9Initial program 88.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6462.7
Applied rewrites62.7%
Taylor expanded in x around inf
Applied rewrites52.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= z -7e-40) (not (<= z 2e+227))) (* (fma y x (* (- b) c)) z) (* (fma (- a) x (* i b)) t)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((z <= -7e-40) || !(z <= 2e+227)) {
tmp = fma(y, x, (-b * c)) * z;
} else {
tmp = fma(-a, x, (i * b)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((z <= -7e-40) || !(z <= 2e+227)) tmp = Float64(fma(y, x, Float64(Float64(-b) * c)) * z); else tmp = Float64(fma(Float64(-a), x, Float64(i * b)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[z, -7e-40], N[Not[LessEqual[z, 2e+227]], $MachinePrecision]], N[(N[(y * x + N[((-b) * c), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-a) * x + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-40} \lor \neg \left(z \leq 2 \cdot 10^{+227}\right):\\
\;\;\;\;\mathsf{fma}\left(y, x, \left(-b\right) \cdot c\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, x, i \cdot b\right) \cdot t\\
\end{array}
\end{array}
if z < -7.0000000000000003e-40 or 2.0000000000000002e227 < z Initial program 68.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.7
Applied rewrites64.7%
Applied rewrites64.7%
if -7.0000000000000003e-40 < z < 2.0000000000000002e227Initial program 80.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6451.2
Applied rewrites51.2%
Final simplification56.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.35e-30)
(* (- b) (* c z))
(if (<= z 3.1e-169)
(* (* i b) t)
(if (<= z 2e+227) (* (* (- x) a) t) (* (* (- b) z) c)))))
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.35e-30) {
tmp = -b * (c * z);
} else if (z <= 3.1e-169) {
tmp = (i * b) * t;
} else if (z <= 2e+227) {
tmp = (-x * a) * t;
} else {
tmp = (-b * z) * 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) :: tmp
if (z <= (-1.35d-30)) then
tmp = -b * (c * z)
else if (z <= 3.1d-169) then
tmp = (i * b) * t
else if (z <= 2d+227) then
tmp = (-x * a) * t
else
tmp = (-b * z) * 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 tmp;
if (z <= -1.35e-30) {
tmp = -b * (c * z);
} else if (z <= 3.1e-169) {
tmp = (i * b) * t;
} else if (z <= 2e+227) {
tmp = (-x * a) * t;
} else {
tmp = (-b * z) * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.35e-30: tmp = -b * (c * z) elif z <= 3.1e-169: tmp = (i * b) * t elif z <= 2e+227: tmp = (-x * a) * t else: tmp = (-b * z) * c return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.35e-30) tmp = Float64(Float64(-b) * Float64(c * z)); elseif (z <= 3.1e-169) tmp = Float64(Float64(i * b) * t); elseif (z <= 2e+227) tmp = Float64(Float64(Float64(-x) * a) * t); else tmp = Float64(Float64(Float64(-b) * z) * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.35e-30) tmp = -b * (c * z); elseif (z <= 3.1e-169) tmp = (i * b) * t; elseif (z <= 2e+227) tmp = (-x * a) * t; else tmp = (-b * z) * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.35e-30], N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e-169], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2e+227], N[(N[((-x) * a), $MachinePrecision] * t), $MachinePrecision], N[(N[((-b) * z), $MachinePrecision] * c), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-30}:\\
\;\;\;\;\left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-169}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+227}:\\
\;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-b\right) \cdot z\right) \cdot c\\
\end{array}
\end{array}
if z < -1.34999999999999994e-30Initial program 65.3%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.1
Applied rewrites63.1%
Taylor expanded in x around 0
Applied rewrites51.4%
if -1.34999999999999994e-30 < z < 3.1000000000000002e-169Initial program 79.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.3
Applied rewrites47.3%
Taylor expanded in x around 0
Applied rewrites32.6%
if 3.1000000000000002e-169 < z < 2.0000000000000002e227Initial program 82.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.0
Applied rewrites55.0%
Taylor expanded in x around inf
Applied rewrites41.5%
if 2.0000000000000002e227 < z Initial program 76.8%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/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-*.f6477.4
Applied rewrites77.4%
Taylor expanded in z around inf
Applied rewrites65.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (- b) (* c z))))
(if (<= z -1.35e-30)
t_1
(if (<= z 3.1e-169)
(* (* i b) t)
(if (<= z 1.8e+228) (* (* (- x) a) 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 = -b * (c * z);
double tmp;
if (z <= -1.35e-30) {
tmp = t_1;
} else if (z <= 3.1e-169) {
tmp = (i * b) * t;
} else if (z <= 1.8e+228) {
tmp = (-x * a) * t;
} 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 = -b * (c * z)
if (z <= (-1.35d-30)) then
tmp = t_1
else if (z <= 3.1d-169) then
tmp = (i * b) * t
else if (z <= 1.8d+228) then
tmp = (-x * a) * t
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 = -b * (c * z);
double tmp;
if (z <= -1.35e-30) {
tmp = t_1;
} else if (z <= 3.1e-169) {
tmp = (i * b) * t;
} else if (z <= 1.8e+228) {
tmp = (-x * a) * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = -b * (c * z) tmp = 0 if z <= -1.35e-30: tmp = t_1 elif z <= 3.1e-169: tmp = (i * b) * t elif z <= 1.8e+228: tmp = (-x * a) * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(-b) * Float64(c * z)) tmp = 0.0 if (z <= -1.35e-30) tmp = t_1; elseif (z <= 3.1e-169) tmp = Float64(Float64(i * b) * t); elseif (z <= 1.8e+228) tmp = Float64(Float64(Float64(-x) * a) * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = -b * (c * z); tmp = 0.0; if (z <= -1.35e-30) tmp = t_1; elseif (z <= 3.1e-169) tmp = (i * b) * t; elseif (z <= 1.8e+228) tmp = (-x * a) * t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-b) * N[(c * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e-30], t$95$1, If[LessEqual[z, 3.1e-169], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 1.8e+228], N[(N[((-x) * a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-b\right) \cdot \left(c \cdot z\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-169}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+228}:\\
\;\;\;\;\left(\left(-x\right) \cdot a\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.34999999999999994e-30 or 1.8e228 < z Initial program 67.0%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.5
Applied rewrites64.5%
Taylor expanded in x around 0
Applied rewrites53.4%
if -1.34999999999999994e-30 < z < 3.1000000000000002e-169Initial program 79.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.3
Applied rewrites47.3%
Taylor expanded in x around 0
Applied rewrites32.6%
if 3.1000000000000002e-169 < z < 1.8e228Initial program 82.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.0
Applied rewrites55.0%
Taylor expanded in x around inf
Applied rewrites41.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- t) x) a)))
(if (<= x -1.2e-32)
t_1
(if (<= x 1.25e-170)
(* (* i b) t)
(if (<= x 1.35e+37) (* (* j a) 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 <= -1.2e-32) {
tmp = t_1;
} else if (x <= 1.25e-170) {
tmp = (i * b) * t;
} else if (x <= 1.35e+37) {
tmp = (j * a) * 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 <= (-1.2d-32)) then
tmp = t_1
else if (x <= 1.25d-170) then
tmp = (i * b) * t
else if (x <= 1.35d+37) then
tmp = (j * a) * 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 <= -1.2e-32) {
tmp = t_1;
} else if (x <= 1.25e-170) {
tmp = (i * b) * t;
} else if (x <= 1.35e+37) {
tmp = (j * a) * 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 <= -1.2e-32: tmp = t_1 elif x <= 1.25e-170: tmp = (i * b) * t elif x <= 1.35e+37: tmp = (j * a) * 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 <= -1.2e-32) tmp = t_1; elseif (x <= 1.25e-170) tmp = Float64(Float64(i * b) * t); elseif (x <= 1.35e+37) tmp = Float64(Float64(j * a) * 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 <= -1.2e-32) tmp = t_1; elseif (x <= 1.25e-170) tmp = (i * b) * t; elseif (x <= 1.35e+37) tmp = (j * a) * 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, -1.2e-32], t$95$1, If[LessEqual[x, 1.25e-170], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 1.35e+37], N[(N[(j * a), $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 -1.2 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-170}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+37}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.2000000000000001e-32 or 1.34999999999999993e37 < x Initial program 76.7%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.0
Applied rewrites55.0%
Taylor expanded in x around inf
Applied rewrites44.0%
if -1.2000000000000001e-32 < x < 1.25000000000000003e-170Initial program 73.6%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6435.5
Applied rewrites35.5%
Taylor expanded in x around 0
Applied rewrites31.9%
if 1.25000000000000003e-170 < x < 1.34999999999999993e37Initial program 78.5%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/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-*.f6462.3
Applied rewrites62.3%
Taylor expanded in z around 0
Applied rewrites32.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= t -1.12e+148) (not (<= t 29000000000000.0))) (* (* b t) i) (* (* j a) c)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((t <= -1.12e+148) || !(t <= 29000000000000.0)) {
tmp = (b * t) * i;
} else {
tmp = (j * a) * 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) :: tmp
if ((t <= (-1.12d+148)) .or. (.not. (t <= 29000000000000.0d0))) then
tmp = (b * t) * i
else
tmp = (j * a) * 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 tmp;
if ((t <= -1.12e+148) || !(t <= 29000000000000.0)) {
tmp = (b * t) * i;
} else {
tmp = (j * a) * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (t <= -1.12e+148) or not (t <= 29000000000000.0): tmp = (b * t) * i else: tmp = (j * a) * c return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((t <= -1.12e+148) || !(t <= 29000000000000.0)) tmp = Float64(Float64(b * t) * i); else tmp = Float64(Float64(j * a) * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((t <= -1.12e+148) || ~((t <= 29000000000000.0))) tmp = (b * t) * i; else tmp = (j * a) * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[t, -1.12e+148], N[Not[LessEqual[t, 29000000000000.0]], $MachinePrecision]], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.12 \cdot 10^{+148} \lor \neg \left(t \leq 29000000000000\right):\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\end{array}
\end{array}
if t < -1.12e148 or 2.9e13 < t Initial program 70.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6457.2
Applied rewrites57.2%
Taylor expanded in y around 0
Applied rewrites44.5%
if -1.12e148 < t < 2.9e13Initial program 79.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.0
Applied rewrites54.0%
Taylor expanded in z around 0
Applied rewrites29.0%
Final simplification35.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= x -6e-125) (not (<= x 2.5e+70))) (* (* z x) y) (* (* i t) b)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((x <= -6e-125) || !(x <= 2.5e+70)) {
tmp = (z * x) * y;
} else {
tmp = (i * t) * 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) :: tmp
if ((x <= (-6d-125)) .or. (.not. (x <= 2.5d+70))) then
tmp = (z * x) * y
else
tmp = (i * t) * 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 tmp;
if ((x <= -6e-125) || !(x <= 2.5e+70)) {
tmp = (z * x) * y;
} else {
tmp = (i * t) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (x <= -6e-125) or not (x <= 2.5e+70): tmp = (z * x) * y else: tmp = (i * t) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((x <= -6e-125) || !(x <= 2.5e+70)) tmp = Float64(Float64(z * x) * y); else tmp = Float64(Float64(i * t) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((x <= -6e-125) || ~((x <= 2.5e+70))) tmp = (z * x) * y; else tmp = (i * t) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[x, -6e-125], N[Not[LessEqual[x, 2.5e+70]], $MachinePrecision]], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6 \cdot 10^{-125} \lor \neg \left(x \leq 2.5 \cdot 10^{+70}\right):\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if x < -5.99999999999999981e-125 or 2.5000000000000001e70 < x Initial program 78.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6441.6
Applied rewrites41.6%
Taylor expanded in x around inf
Applied rewrites26.9%
Applied rewrites29.9%
if -5.99999999999999981e-125 < x < 2.5000000000000001e70Initial program 73.3%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6438.4
Applied rewrites38.4%
Taylor expanded in x around 0
Applied rewrites29.8%
Final simplification29.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= b -8.5e-27) (* (* i b) t) (if (<= b 3.6e-60) (* (* y x) z) (* (* b t) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -8.5e-27) {
tmp = (i * b) * t;
} else if (b <= 3.6e-60) {
tmp = (y * x) * z;
} else {
tmp = (b * t) * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-8.5d-27)) then
tmp = (i * b) * t
else if (b <= 3.6d-60) then
tmp = (y * x) * z
else
tmp = (b * t) * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -8.5e-27) {
tmp = (i * b) * t;
} else if (b <= 3.6e-60) {
tmp = (y * x) * z;
} else {
tmp = (b * t) * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -8.5e-27: tmp = (i * b) * t elif b <= 3.6e-60: tmp = (y * x) * z else: tmp = (b * t) * i return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -8.5e-27) tmp = Float64(Float64(i * b) * t); elseif (b <= 3.6e-60) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(b * t) * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -8.5e-27) tmp = (i * b) * t; elseif (b <= 3.6e-60) tmp = (y * x) * z; else tmp = (b * t) * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -8.5e-27], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, 3.6e-60], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{-27}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{-60}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if b < -8.50000000000000033e-27Initial program 65.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.8
Applied rewrites47.8%
Taylor expanded in x around 0
Applied rewrites36.9%
if -8.50000000000000033e-27 < b < 3.6e-60Initial program 80.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6431.3
Applied rewrites31.3%
Taylor expanded in x around inf
Applied rewrites25.8%
if 3.6e-60 < b Initial program 77.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6449.9
Applied rewrites49.9%
Taylor expanded in y around 0
Applied rewrites38.6%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= b -8.5e-27) (* (* i b) t) (if (<= b 3.6e-60) (* (* y x) z) (* (* i t) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -8.5e-27) {
tmp = (i * b) * t;
} else if (b <= 3.6e-60) {
tmp = (y * x) * z;
} else {
tmp = (i * t) * 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) :: tmp
if (b <= (-8.5d-27)) then
tmp = (i * b) * t
else if (b <= 3.6d-60) then
tmp = (y * x) * z
else
tmp = (i * t) * 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 tmp;
if (b <= -8.5e-27) {
tmp = (i * b) * t;
} else if (b <= 3.6e-60) {
tmp = (y * x) * z;
} else {
tmp = (i * t) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -8.5e-27: tmp = (i * b) * t elif b <= 3.6e-60: tmp = (y * x) * z else: tmp = (i * t) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -8.5e-27) tmp = Float64(Float64(i * b) * t); elseif (b <= 3.6e-60) tmp = Float64(Float64(y * x) * z); else tmp = Float64(Float64(i * t) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -8.5e-27) tmp = (i * b) * t; elseif (b <= 3.6e-60) tmp = (y * x) * z; else tmp = (i * t) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -8.5e-27], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, 3.6e-60], N[(N[(y * x), $MachinePrecision] * z), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{-27}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{-60}:\\
\;\;\;\;\left(y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -8.50000000000000033e-27Initial program 65.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.8
Applied rewrites47.8%
Taylor expanded in x around 0
Applied rewrites36.9%
if -8.50000000000000033e-27 < b < 3.6e-60Initial program 80.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6431.3
Applied rewrites31.3%
Taylor expanded in x around inf
Applied rewrites25.8%
if 3.6e-60 < b Initial program 77.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.5
Applied rewrites54.5%
Taylor expanded in x around 0
Applied rewrites34.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= b -8.5e-27) (* (* i b) t) (if (<= b 3.6e-60) (* (* z x) y) (* (* i t) b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -8.5e-27) {
tmp = (i * b) * t;
} else if (b <= 3.6e-60) {
tmp = (z * x) * y;
} else {
tmp = (i * t) * 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) :: tmp
if (b <= (-8.5d-27)) then
tmp = (i * b) * t
else if (b <= 3.6d-60) then
tmp = (z * x) * y
else
tmp = (i * t) * 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 tmp;
if (b <= -8.5e-27) {
tmp = (i * b) * t;
} else if (b <= 3.6e-60) {
tmp = (z * x) * y;
} else {
tmp = (i * t) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -8.5e-27: tmp = (i * b) * t elif b <= 3.6e-60: tmp = (z * x) * y else: tmp = (i * t) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -8.5e-27) tmp = Float64(Float64(i * b) * t); elseif (b <= 3.6e-60) tmp = Float64(Float64(z * x) * y); else tmp = Float64(Float64(i * t) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -8.5e-27) tmp = (i * b) * t; elseif (b <= 3.6e-60) tmp = (z * x) * y; else tmp = (i * t) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -8.5e-27], N[(N[(i * b), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[b, 3.6e-60], N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.5 \cdot 10^{-27}:\\
\;\;\;\;\left(i \cdot b\right) \cdot t\\
\mathbf{elif}\;b \leq 3.6 \cdot 10^{-60}:\\
\;\;\;\;\left(z \cdot x\right) \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\end{array}
\end{array}
if b < -8.50000000000000033e-27Initial program 65.4%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.8
Applied rewrites47.8%
Taylor expanded in x around 0
Applied rewrites36.9%
if -8.50000000000000033e-27 < b < 3.6e-60Initial program 80.9%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
distribute-lft-neg-inN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6431.3
Applied rewrites31.3%
Taylor expanded in x around inf
Applied rewrites22.7%
Applied rewrites25.0%
if 3.6e-60 < b Initial program 77.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6454.5
Applied rewrites54.5%
Taylor expanded in x around 0
Applied rewrites34.2%
(FPCore (x y z t a b c i j) :precision binary64 (* (* i t) b))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (i * t) * b;
}
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 = (i * t) * b
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 (i * t) * b;
}
def code(x, y, z, t, a, b, c, i, j): return (i * t) * b
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(i * t) * b) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (i * t) * b; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]
\begin{array}{l}
\\
\left(i \cdot t\right) \cdot b
\end{array}
Initial program 75.9%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
fp-cancel-sub-sign-invN/A
associate-*r*N/A
mul-1-negN/A
metadata-evalN/A
*-lft-identityN/A
lower-fma.f64N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.4
Applied rewrites43.4%
Taylor expanded in x around 0
Applied rewrites21.8%
(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 2024337
(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)))))