
(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 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(-
(* (- (* c a) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i t) (* c z)) b)))))
(if (<= t_1 INFINITY)
t_1
(* (fma (- z) c (fma (fma (- j) i (* z x)) (/ y b) (* 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 = (((c * a) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * t) - (c * z)) * b));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(-z, c, fma(fma(-j, i, (z * x)), (y / b), (i * t))) * b;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(c * a) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * t) - Float64(c * z)) * b))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(fma(Float64(-z), c, fma(fma(Float64(-j), i, Float64(z * x)), Float64(y / b), Float64(i * t))) * b); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * t), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-z) * c + N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * N[(y / b), $MachinePrecision] + N[(i * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot a - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot t - c \cdot z\right) \cdot b\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-z, c, \mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), \frac{y}{b}, i \cdot t\right)\right) \cdot b\\
\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 93.7%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in a around 0
sub-negN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
Applied rewrites41.9%
Taylor expanded in j around inf
Applied rewrites25.3%
Taylor expanded in b around inf
Applied rewrites61.0%
Final simplification88.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (* y x) z (* (fma (- x) a (* i b)) t))))
(if (<= t -2.15e+207)
t_1
(if (<= t -1.5e-93)
(fma (* b t) i (* (fma (- t) a (* z y)) x))
(if (<= t 1.8e-185)
(fma (fma (- j) i (* z x)) y (* (* (- c) z) b))
(if (<= t 4.7e+105)
(+ (* (* z y) x) (* (- (* c a) (* i y)) j))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma((y * x), z, (fma(-x, a, (i * b)) * t));
double tmp;
if (t <= -2.15e+207) {
tmp = t_1;
} else if (t <= -1.5e-93) {
tmp = fma((b * t), i, (fma(-t, a, (z * y)) * x));
} else if (t <= 1.8e-185) {
tmp = fma(fma(-j, i, (z * x)), y, ((-c * z) * b));
} else if (t <= 4.7e+105) {
tmp = ((z * y) * x) + (((c * a) - (i * y)) * j);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(y * x), z, Float64(fma(Float64(-x), a, Float64(i * b)) * t)) tmp = 0.0 if (t <= -2.15e+207) tmp = t_1; elseif (t <= -1.5e-93) tmp = fma(Float64(b * t), i, Float64(fma(Float64(-t), a, Float64(z * y)) * x)); elseif (t <= 1.8e-185) tmp = fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(Float64(Float64(-c) * z) * b)); elseif (t <= 4.7e+105) tmp = Float64(Float64(Float64(z * y) * x) + Float64(Float64(Float64(c * a) - Float64(i * y)) * j)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(y * x), $MachinePrecision] * z + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.15e+207], t$95$1, If[LessEqual[t, -1.5e-93], N[(N[(b * t), $MachinePrecision] * i + N[(N[((-t) * a + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-185], N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+105], N[(N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision] + N[(N[(N[(c * a), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, z, \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\right)\\
\mathbf{if}\;t \leq -2.15 \cdot 10^{+207}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-93}:\\
\;\;\;\;\mathsf{fma}\left(b \cdot t, i, \mathsf{fma}\left(-t, a, z \cdot y\right) \cdot x\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-185}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \left(\left(-c\right) \cdot z\right) \cdot b\right)\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+105}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x + \left(c \cdot a - i \cdot y\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.1499999999999999e207 or 4.70000000000000004e105 < t Initial program 62.6%
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-/.f6462.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.f6468.5
Applied rewrites68.5%
Taylor expanded in c around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
cancel-sign-subN/A
mul-1-negN/A
associate-*r*N/A
Applied rewrites66.0%
Taylor expanded in j around 0
Applied rewrites82.6%
if -2.1499999999999999e207 < t < -1.5000000000000001e-93Initial program 81.1%
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-/.f6481.1
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6481.1
Applied rewrites81.1%
Taylor expanded in c around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
cancel-sign-subN/A
mul-1-negN/A
associate-*r*N/A
Applied rewrites68.8%
Taylor expanded in b around inf
Applied rewrites63.5%
if -1.5000000000000001e-93 < t < 1.7999999999999999e-185Initial program 86.0%
Taylor expanded in a around 0
sub-negN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
Applied rewrites70.9%
Taylor expanded in c around inf
Applied rewrites68.6%
if 1.7999999999999999e-185 < t < 4.70000000000000004e105Initial program 85.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6467.8
Applied rewrites67.8%
Final simplification71.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j a)) c)))
(if (<= c -4.5e+54)
t_1
(if (<= c 4.7e-290)
(fma (* y x) z (* (fma (- x) a (* i b)) t))
(if (<= c 2.8e-195)
(* (fma (- y) j (* b t)) i)
(if (<= c 1.75e+89)
(fma (fma (- j) i (* z x)) y (* (* (- c) z) b))
t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, z, (j * a)) * c;
double tmp;
if (c <= -4.5e+54) {
tmp = t_1;
} else if (c <= 4.7e-290) {
tmp = fma((y * x), z, (fma(-x, a, (i * b)) * t));
} else if (c <= 2.8e-195) {
tmp = fma(-y, j, (b * t)) * i;
} else if (c <= 1.75e+89) {
tmp = fma(fma(-j, i, (z * x)), y, ((-c * z) * b));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -4.5e+54) tmp = t_1; elseif (c <= 4.7e-290) tmp = fma(Float64(y * x), z, Float64(fma(Float64(-x), a, Float64(i * b)) * t)); elseif (c <= 2.8e-195) tmp = Float64(fma(Float64(-y), j, Float64(b * t)) * i); elseif (c <= 1.75e+89) tmp = fma(fma(Float64(-j), i, Float64(z * x)), y, Float64(Float64(Float64(-c) * z) * b)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -4.5e+54], t$95$1, If[LessEqual[c, 4.7e-290], N[(N[(y * x), $MachinePrecision] * z + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.8e-195], N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[c, 1.75e+89], N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y + N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -4.5 \cdot 10^{+54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 4.7 \cdot 10^{-290}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot x, z, \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\right)\\
\mathbf{elif}\;c \leq 2.8 \cdot 10^{-195}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{elif}\;c \leq 1.75 \cdot 10^{+89}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-j, i, z \cdot x\right), y, \left(\left(-c\right) \cdot z\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -4.49999999999999984e54 or 1.75e89 < c Initial program 68.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
lower-*.f6466.5
Applied rewrites66.5%
if -4.49999999999999984e54 < c < 4.7000000000000001e-290Initial program 82.9%
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-/.f6482.8
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6482.8
Applied rewrites82.8%
Taylor expanded in c around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
cancel-sign-subN/A
mul-1-negN/A
associate-*r*N/A
Applied rewrites79.0%
Taylor expanded in j around 0
Applied rewrites73.8%
if 4.7000000000000001e-290 < c < 2.80000000000000003e-195Initial program 80.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6490.0
Applied rewrites90.0%
if 2.80000000000000003e-195 < c < 1.75e89Initial program 87.1%
Taylor expanded in a around 0
sub-negN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
Applied rewrites68.3%
Taylor expanded in c around inf
Applied rewrites63.6%
Final simplification69.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x))
(t_2 (fma (fma (- y) j (* b t)) i t_1)))
(if (<= i -4.2e+24)
t_2
(if (<= i 1.75e+65) (fma (fma (- b) z (* j a)) c t_1) t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double t_2 = fma(fma(-y, j, (b * t)), i, t_1);
double tmp;
if (i <= -4.2e+24) {
tmp = t_2;
} else if (i <= 1.75e+65) {
tmp = fma(fma(-b, z, (j * a)), c, t_1);
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) t_2 = fma(fma(Float64(-y), j, Float64(b * t)), i, t_1) tmp = 0.0 if (i <= -4.2e+24) tmp = t_2; elseif (i <= 1.75e+65) tmp = fma(fma(Float64(-b), z, Float64(j * a)), c, t_1); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i + t$95$1), $MachinePrecision]}, If[LessEqual[i, -4.2e+24], t$95$2, If[LessEqual[i, 1.75e+65], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c + t$95$1), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
t_2 := \mathsf{fma}\left(\mathsf{fma}\left(-y, j, b \cdot t\right), i, t\_1\right)\\
\mathbf{if}\;i \leq -4.2 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 1.75 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, z, j \cdot a\right), c, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if i < -4.2000000000000003e24 or 1.75e65 < i Initial program 71.8%
Taylor expanded in c around 0
cancel-sign-sub-invN/A
+-commutativeN/A
metadata-evalN/A
*-lft-identityN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lft-identityN/A
metadata-evalN/A
cancel-sign-sub-invN/A
+-commutativeN/A
Applied rewrites79.5%
if -4.2000000000000003e24 < i < 1.75e65Initial program 83.5%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites79.4%
Final simplification79.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- y) j (* b t)) i)))
(if (<= i -1.6e+26)
t_1
(if (<= i 1.2e+227)
(fma (fma (- b) z (* j a)) c (* (fma (- a) t (* z y)) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-y, j, (b * t)) * i;
double tmp;
if (i <= -1.6e+26) {
tmp = t_1;
} else if (i <= 1.2e+227) {
tmp = fma(fma(-b, z, (j * a)), c, (fma(-a, t, (z * y)) * x));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-y), j, Float64(b * t)) * i) tmp = 0.0 if (i <= -1.6e+26) tmp = t_1; elseif (i <= 1.2e+227) tmp = fma(fma(Float64(-b), z, Float64(j * a)), c, Float64(fma(Float64(-a), t, Float64(z * y)) * x)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-y) * j + N[(b * t), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -1.6e+26], t$95$1, If[LessEqual[i, 1.2e+227], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-y, j, b \cdot t\right) \cdot i\\
\mathbf{if}\;i \leq -1.6 \cdot 10^{+26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.2 \cdot 10^{+227}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, z, j \cdot a\right), c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.60000000000000014e26 or 1.1999999999999999e227 < i Initial program 71.4%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6474.6
Applied rewrites74.6%
if -1.60000000000000014e26 < i < 1.1999999999999999e227Initial program 81.8%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*l*N/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites76.8%
Final simplification76.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)) (t_2 (* (fma (- j) i (* z x)) y)))
(if (<= y -0.05)
t_2
(if (<= y -1.1e-140)
t_1
(if (<= y 1.4e-128)
(* (fma (- c) z (* i t)) b)
(if (<= y 4e-81)
(* (fma (- i) y (* c a)) j)
(if (<= y 2.5e+74) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double t_2 = fma(-j, i, (z * x)) * y;
double tmp;
if (y <= -0.05) {
tmp = t_2;
} else if (y <= -1.1e-140) {
tmp = t_1;
} else if (y <= 1.4e-128) {
tmp = fma(-c, z, (i * t)) * b;
} else if (y <= 4e-81) {
tmp = fma(-i, y, (c * a)) * j;
} else if (y <= 2.5e+74) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) t_2 = Float64(fma(Float64(-j), i, Float64(z * x)) * y) tmp = 0.0 if (y <= -0.05) tmp = t_2; elseif (y <= -1.1e-140) tmp = t_1; elseif (y <= 1.4e-128) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); elseif (y <= 4e-81) tmp = Float64(fma(Float64(-i), y, Float64(c * a)) * j); elseif (y <= 2.5e+74) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -0.05], t$95$2, If[LessEqual[y, -1.1e-140], t$95$1, If[LessEqual[y, 1.4e-128], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 4e-81], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[y, 2.5e+74], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
t_2 := \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -0.05:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{-128}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-81}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -0.050000000000000003 or 2.49999999999999982e74 < y Initial program 70.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6467.9
Applied rewrites67.9%
if -0.050000000000000003 < y < -1.1e-140 or 3.9999999999999998e-81 < y < 2.49999999999999982e74Initial program 83.4%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6455.6
Applied rewrites55.6%
if -1.1e-140 < y < 1.3999999999999999e-128Initial program 86.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
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6460.4
Applied rewrites60.4%
if 1.3999999999999999e-128 < y < 3.9999999999999998e-81Initial program 86.4%
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-*.f6467.5
Applied rewrites67.5%
Final simplification63.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* (- x) a) t)))
(if (<= a -5.8e+191)
(* (* j c) a)
(if (<= a -2.05e+29)
t_1
(if (<= a -7.6e-144)
(* (* b t) i)
(if (<= a 105000000.0)
(* (* z y) x)
(if (<= a 3.3e+145) t_1 (* (* j a) c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (-x * a) * t;
double tmp;
if (a <= -5.8e+191) {
tmp = (j * c) * a;
} else if (a <= -2.05e+29) {
tmp = t_1;
} else if (a <= -7.6e-144) {
tmp = (b * t) * i;
} else if (a <= 105000000.0) {
tmp = (z * y) * x;
} else if (a <= 3.3e+145) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (-x * a) * t
if (a <= (-5.8d+191)) then
tmp = (j * c) * a
else if (a <= (-2.05d+29)) then
tmp = t_1
else if (a <= (-7.6d-144)) then
tmp = (b * t) * i
else if (a <= 105000000.0d0) then
tmp = (z * y) * x
else if (a <= 3.3d+145) then
tmp = t_1
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 t_1 = (-x * a) * t;
double tmp;
if (a <= -5.8e+191) {
tmp = (j * c) * a;
} else if (a <= -2.05e+29) {
tmp = t_1;
} else if (a <= -7.6e-144) {
tmp = (b * t) * i;
} else if (a <= 105000000.0) {
tmp = (z * y) * x;
} else if (a <= 3.3e+145) {
tmp = t_1;
} else {
tmp = (j * a) * c;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (-x * a) * t tmp = 0 if a <= -5.8e+191: tmp = (j * c) * a elif a <= -2.05e+29: tmp = t_1 elif a <= -7.6e-144: tmp = (b * t) * i elif a <= 105000000.0: tmp = (z * y) * x elif a <= 3.3e+145: tmp = t_1 else: tmp = (j * a) * c return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(-x) * a) * t) tmp = 0.0 if (a <= -5.8e+191) tmp = Float64(Float64(j * c) * a); elseif (a <= -2.05e+29) tmp = t_1; elseif (a <= -7.6e-144) tmp = Float64(Float64(b * t) * i); elseif (a <= 105000000.0) tmp = Float64(Float64(z * y) * x); elseif (a <= 3.3e+145) tmp = t_1; else tmp = Float64(Float64(j * a) * c); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (-x * a) * t; tmp = 0.0; if (a <= -5.8e+191) tmp = (j * c) * a; elseif (a <= -2.05e+29) tmp = t_1; elseif (a <= -7.6e-144) tmp = (b * t) * i; elseif (a <= 105000000.0) tmp = (z * y) * x; elseif (a <= 3.3e+145) tmp = t_1; else tmp = (j * a) * c; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * a), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[a, -5.8e+191], N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[a, -2.05e+29], t$95$1, If[LessEqual[a, -7.6e-144], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[a, 105000000.0], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 3.3e+145], t$95$1, N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(-x\right) \cdot a\right) \cdot t\\
\mathbf{if}\;a \leq -5.8 \cdot 10^{+191}:\\
\;\;\;\;\left(j \cdot c\right) \cdot a\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.6 \cdot 10^{-144}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\mathbf{elif}\;a \leq 105000000:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{+145}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\end{array}
\end{array}
if a < -5.8000000000000003e191Initial program 72.1%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.2
Applied rewrites61.2%
Taylor expanded in c around inf
Applied rewrites56.7%
if -5.8000000000000003e191 < a < -2.0500000000000002e29 or 1.05e8 < a < 3.30000000000000027e145Initial program 67.1%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.3
Applied rewrites61.3%
Taylor expanded in a around inf
Applied rewrites49.5%
Applied rewrites52.7%
if -2.0500000000000002e29 < a < -7.59999999999999985e-144Initial program 81.3%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6449.9
Applied rewrites49.9%
Taylor expanded in b around inf
Applied rewrites36.9%
if -7.59999999999999985e-144 < a < 1.05e8Initial program 87.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.3
Applied rewrites39.3%
Taylor expanded in a around 0
Applied rewrites37.3%
if 3.30000000000000027e145 < a Initial program 74.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-*.f6455.9
Applied rewrites55.9%
Taylor expanded in c around inf
Applied rewrites43.8%
Applied rewrites49.8%
Final simplification44.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- x) t (* j c)) a)) (t_2 (* (fma (- j) i (* z x)) y)))
(if (<= y -3.1e-56)
t_2
(if (<= y -1.05e-140)
t_1
(if (<= y 1e-130)
(* (fma (- c) z (* i t)) b)
(if (<= y 7.2e+124) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-x, t, (j * c)) * a;
double t_2 = fma(-j, i, (z * x)) * y;
double tmp;
if (y <= -3.1e-56) {
tmp = t_2;
} else if (y <= -1.05e-140) {
tmp = t_1;
} else if (y <= 1e-130) {
tmp = fma(-c, z, (i * t)) * b;
} else if (y <= 7.2e+124) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), t, Float64(j * c)) * a) t_2 = Float64(fma(Float64(-j), i, Float64(z * x)) * y) tmp = 0.0 if (y <= -3.1e-56) tmp = t_2; elseif (y <= -1.05e-140) tmp = t_1; elseif (y <= 1e-130) tmp = Float64(fma(Float64(-c), z, Float64(i * t)) * b); elseif (y <= 7.2e+124) tmp = t_1; else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * t + N[(j * c), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-j) * i + N[(z * x), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -3.1e-56], t$95$2, If[LessEqual[y, -1.05e-140], t$95$1, If[LessEqual[y, 1e-130], N[(N[((-c) * z + N[(i * t), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[y, 7.2e+124], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, t, j \cdot c\right) \cdot a\\
t_2 := \mathsf{fma}\left(-j, i, z \cdot x\right) \cdot y\\
\mathbf{if}\;y \leq -3.1 \cdot 10^{-56}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.05 \cdot 10^{-140}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 10^{-130}:\\
\;\;\;\;\mathsf{fma}\left(-c, z, i \cdot t\right) \cdot b\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -3.09999999999999987e-56 or 7.19999999999999972e124 < y Initial program 74.3%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6470.5
Applied rewrites70.5%
if -3.09999999999999987e-56 < y < -1.05000000000000009e-140 or 1.0000000000000001e-130 < y < 7.19999999999999972e124Initial program 78.8%
Taylor expanded in a around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6457.7
Applied rewrites57.7%
if -1.05000000000000009e-140 < y < 1.0000000000000001e-130Initial program 86.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
distribute-lft-neg-inN/A
neg-mul-1N/A
remove-double-negN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6460.4
Applied rewrites60.4%
Final simplification64.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -5e-9)
(* (fma (- b) z (* j a)) c)
(if (<= c -5.8e-67)
(* (fma (- a) t (* z y)) x)
(if (<= c 3.3e-169)
(* (fma (- x) a (* i b)) t)
(if (<= c 50000.0)
(* (fma (- c) b (* y x)) z)
(* (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 (c <= -5e-9) {
tmp = fma(-b, z, (j * a)) * c;
} else if (c <= -5.8e-67) {
tmp = fma(-a, t, (z * y)) * x;
} else if (c <= 3.3e-169) {
tmp = fma(-x, a, (i * b)) * t;
} else if (c <= 50000.0) {
tmp = fma(-c, b, (y * x)) * z;
} 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 (c <= -5e-9) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); elseif (c <= -5.8e-67) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); elseif (c <= 3.3e-169) tmp = Float64(fma(Float64(-x), a, Float64(i * b)) * t); elseif (c <= 50000.0) tmp = Float64(fma(Float64(-c), b, Float64(y * x)) * z); 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[c, -5e-9], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[c, -5.8e-67], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[c, 3.3e-169], N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[c, 50000.0], N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{elif}\;c \leq -5.8 \cdot 10^{-67}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{elif}\;c \leq 3.3 \cdot 10^{-169}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\\
\mathbf{elif}\;c \leq 50000:\\
\;\;\;\;\mathsf{fma}\left(-c, b, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if c < -5.0000000000000001e-9Initial program 74.1%
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
lower-*.f6462.3
Applied rewrites62.3%
if -5.0000000000000001e-9 < c < -5.8000000000000001e-67Initial program 92.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6485.0
Applied rewrites85.0%
if -5.8000000000000001e-67 < c < 3.30000000000000026e-169Initial program 81.5%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6462.0
Applied rewrites62.0%
if 3.30000000000000026e-169 < c < 5e4Initial program 80.5%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6454.5
Applied rewrites54.5%
if 5e4 < c Initial program 76.0%
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-*.f6461.5
Applied rewrites61.5%
Final simplification61.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -4.5e+54)
(* (fma (- b) z (* j a)) c)
(if (<= c 70000.0)
(fma (* y x) z (* (fma (- x) a (* i b)) 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 (c <= -4.5e+54) {
tmp = fma(-b, z, (j * a)) * c;
} else if (c <= 70000.0) {
tmp = fma((y * x), z, (fma(-x, a, (i * b)) * 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 (c <= -4.5e+54) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); elseif (c <= 70000.0) tmp = fma(Float64(y * x), z, Float64(fma(Float64(-x), a, Float64(i * b)) * 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[c, -4.5e+54], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[c, 70000.0], N[(N[(y * x), $MachinePrecision] * z + N[(N[((-x) * a + N[(i * b), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -4.5 \cdot 10^{+54}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{elif}\;c \leq 70000:\\
\;\;\;\;\mathsf{fma}\left(y \cdot x, z, \mathsf{fma}\left(-x, a, i \cdot b\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if c < -4.49999999999999984e54Initial program 71.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
lower-*.f6467.5
Applied rewrites67.5%
if -4.49999999999999984e54 < c < 7e4Initial program 82.3%
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-/.f6482.2
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6482.2
Applied rewrites82.2%
Taylor expanded in c around 0
associate-*r*N/A
mul-1-negN/A
cancel-sign-subN/A
+-commutativeN/A
associate-+l+N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
cancel-sign-subN/A
mul-1-negN/A
associate-*r*N/A
Applied rewrites75.9%
Taylor expanded in j around 0
Applied rewrites64.2%
if 7e4 < c Initial program 76.0%
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-*.f6461.5
Applied rewrites61.5%
Final simplification64.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z x) y)) (t_2 (* (* i t) b)))
(if (<= i -13500000.0)
t_2
(if (<= i 1.06e-305)
t_1
(if (<= i 1.02e-200) (* (* j a) c) (if (<= i 1.58e+90) 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 = (z * x) * y;
double t_2 = (i * t) * b;
double tmp;
if (i <= -13500000.0) {
tmp = t_2;
} else if (i <= 1.06e-305) {
tmp = t_1;
} else if (i <= 1.02e-200) {
tmp = (j * a) * c;
} else if (i <= 1.58e+90) {
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 = (z * x) * y
t_2 = (i * t) * b
if (i <= (-13500000.0d0)) then
tmp = t_2
else if (i <= 1.06d-305) then
tmp = t_1
else if (i <= 1.02d-200) then
tmp = (j * a) * c
else if (i <= 1.58d+90) 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 = (z * x) * y;
double t_2 = (i * t) * b;
double tmp;
if (i <= -13500000.0) {
tmp = t_2;
} else if (i <= 1.06e-305) {
tmp = t_1;
} else if (i <= 1.02e-200) {
tmp = (j * a) * c;
} else if (i <= 1.58e+90) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * x) * y t_2 = (i * t) * b tmp = 0 if i <= -13500000.0: tmp = t_2 elif i <= 1.06e-305: tmp = t_1 elif i <= 1.02e-200: tmp = (j * a) * c elif i <= 1.58e+90: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * x) * y) t_2 = Float64(Float64(i * t) * b) tmp = 0.0 if (i <= -13500000.0) tmp = t_2; elseif (i <= 1.06e-305) tmp = t_1; elseif (i <= 1.02e-200) tmp = Float64(Float64(j * a) * c); elseif (i <= 1.58e+90) 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 = (z * x) * y; t_2 = (i * t) * b; tmp = 0.0; if (i <= -13500000.0) tmp = t_2; elseif (i <= 1.06e-305) tmp = t_1; elseif (i <= 1.02e-200) tmp = (j * a) * c; elseif (i <= 1.58e+90) 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[(z * x), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[i, -13500000.0], t$95$2, If[LessEqual[i, 1.06e-305], t$95$1, If[LessEqual[i, 1.02e-200], N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[i, 1.58e+90], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot x\right) \cdot y\\
t_2 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;i \leq -13500000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;i \leq 1.06 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.02 \cdot 10^{-200}:\\
\;\;\;\;\left(j \cdot a\right) \cdot c\\
\mathbf{elif}\;i \leq 1.58 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if i < -1.35e7 or 1.58e90 < i Initial program 73.0%
Taylor expanded in a around 0
sub-negN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
Applied rewrites64.9%
Taylor expanded in t around inf
Applied rewrites38.2%
if -1.35e7 < i < 1.06e-305 or 1.02e-200 < i < 1.58e90Initial program 80.1%
Taylor expanded in a around 0
sub-negN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
Applied rewrites61.1%
Taylor expanded in x around inf
Applied rewrites35.6%
if 1.06e-305 < i < 1.02e-200Initial program 93.0%
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-*.f6443.1
Applied rewrites43.1%
Taylor expanded in c around inf
Applied rewrites40.0%
Applied rewrites46.2%
Final simplification37.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -2.7e+94)
(* (* z y) x)
(if (<= z 9.5e-293)
(* (* (- t) x) a)
(if (<= z 5.1e+79) (* (* (- y) j) i) (* (* (- c) z) b)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -2.7e+94) {
tmp = (z * y) * x;
} else if (z <= 9.5e-293) {
tmp = (-t * x) * a;
} else if (z <= 5.1e+79) {
tmp = (-y * j) * i;
} else {
tmp = (-c * z) * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-2.7d+94)) then
tmp = (z * y) * x
else if (z <= 9.5d-293) then
tmp = (-t * x) * a
else if (z <= 5.1d+79) then
tmp = (-y * j) * i
else
tmp = (-c * z) * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -2.7e+94) {
tmp = (z * y) * x;
} else if (z <= 9.5e-293) {
tmp = (-t * x) * a;
} else if (z <= 5.1e+79) {
tmp = (-y * j) * i;
} else {
tmp = (-c * z) * b;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -2.7e+94: tmp = (z * y) * x elif z <= 9.5e-293: tmp = (-t * x) * a elif z <= 5.1e+79: tmp = (-y * j) * i else: tmp = (-c * z) * b return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -2.7e+94) tmp = Float64(Float64(z * y) * x); elseif (z <= 9.5e-293) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (z <= 5.1e+79) tmp = Float64(Float64(Float64(-y) * j) * i); else tmp = Float64(Float64(Float64(-c) * z) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -2.7e+94) tmp = (z * y) * x; elseif (z <= 9.5e-293) tmp = (-t * x) * a; elseif (z <= 5.1e+79) tmp = (-y * j) * i; else tmp = (-c * z) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -2.7e+94], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 9.5e-293], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 5.1e+79], N[(N[((-y) * j), $MachinePrecision] * i), $MachinePrecision], N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+94}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+79}:\\
\;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b\\
\end{array}
\end{array}
if z < -2.7000000000000001e94Initial program 66.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6460.3
Applied rewrites60.3%
Taylor expanded in a around 0
Applied rewrites58.3%
if -2.7000000000000001e94 < z < 9.50000000000000049e-293Initial program 86.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.8
Applied rewrites43.8%
Taylor expanded in a around inf
Applied rewrites34.7%
if 9.50000000000000049e-293 < z < 5.1000000000000001e79Initial program 79.4%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6453.4
Applied rewrites53.4%
Taylor expanded in b around 0
Applied rewrites39.1%
if 5.1000000000000001e79 < z Initial program 75.6%
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-/.f6475.6
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6482.2
Applied rewrites82.2%
Taylor expanded in b around inf
associate-*r*N/A
distribute-lft-inN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-inN/A
+-commutativeN/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-*.f6443.4
Applied rewrites43.4%
Taylor expanded in c around inf
Applied rewrites43.7%
Final simplification41.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (* z y) x)))
(if (<= z -2.7e+94)
t_1
(if (<= z 9.5e-293)
(* (* (- t) x) a)
(if (<= z 2.75e+113) (* (* (- y) j) i) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -2.7e+94) {
tmp = t_1;
} else if (z <= 9.5e-293) {
tmp = (-t * x) * a;
} else if (z <= 2.75e+113) {
tmp = (-y * j) * i;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (z * y) * x
if (z <= (-2.7d+94)) then
tmp = t_1
else if (z <= 9.5d-293) then
tmp = (-t * x) * a
else if (z <= 2.75d+113) then
tmp = (-y * j) * i
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -2.7e+94) {
tmp = t_1;
} else if (z <= 9.5e-293) {
tmp = (-t * x) * a;
} else if (z <= 2.75e+113) {
tmp = (-y * j) * i;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (z * y) * x tmp = 0 if z <= -2.7e+94: tmp = t_1 elif z <= 9.5e-293: tmp = (-t * x) * a elif z <= 2.75e+113: tmp = (-y * j) * i else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(z * y) * x) tmp = 0.0 if (z <= -2.7e+94) tmp = t_1; elseif (z <= 9.5e-293) tmp = Float64(Float64(Float64(-t) * x) * a); elseif (z <= 2.75e+113) tmp = Float64(Float64(Float64(-y) * j) * i); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (z * y) * x; tmp = 0.0; if (z <= -2.7e+94) tmp = t_1; elseif (z <= 9.5e-293) tmp = (-t * x) * a; elseif (z <= 2.75e+113) tmp = (-y * j) * i; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -2.7e+94], t$95$1, If[LessEqual[z, 9.5e-293], N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[z, 2.75e+113], N[(N[((-y) * j), $MachinePrecision] * i), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-293}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+113}:\\
\;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7000000000000001e94 or 2.75e113 < z Initial program 69.9%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.3
Applied rewrites59.3%
Taylor expanded in a around 0
Applied rewrites51.7%
if -2.7000000000000001e94 < z < 9.50000000000000049e-293Initial program 86.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.8
Applied rewrites43.8%
Taylor expanded in a around inf
Applied rewrites34.7%
if 9.50000000000000049e-293 < z < 2.75e113Initial program 80.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6451.5
Applied rewrites51.5%
Taylor expanded in b around 0
Applied rewrites37.7%
Final simplification41.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -5e-9)
(* (fma (- b) z (* j a)) c)
(if (<= c 64000.0)
(* (fma (- a) t (* z y)) x)
(* (fma (- i) y (* c a)) j))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -5e-9) {
tmp = fma(-b, z, (j * a)) * c;
} else if (c <= 64000.0) {
tmp = fma(-a, t, (z * y)) * x;
} 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 (c <= -5e-9) tmp = Float64(fma(Float64(-b), z, Float64(j * a)) * c); elseif (c <= 64000.0) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); 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[c, -5e-9], N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision], If[LessEqual[c, 64000.0], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[((-i) * y + N[(c * a), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{elif}\;c \leq 64000:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot a\right) \cdot j\\
\end{array}
\end{array}
if c < -5.0000000000000001e-9Initial program 74.1%
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
lower-*.f6462.3
Applied rewrites62.3%
if -5.0000000000000001e-9 < c < 64000Initial program 82.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.4
Applied rewrites52.4%
if 64000 < c Initial program 76.0%
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-*.f6461.5
Applied rewrites61.5%
Final simplification57.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (fma (- b) z (* j a)) c))) (if (<= c -5e-9) t_1 (if (<= c 45000.0) (* (fma (- a) t (* z y)) x) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, z, (j * a)) * c;
double tmp;
if (c <= -5e-9) {
tmp = t_1;
} else if (c <= 45000.0) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), z, Float64(j * a)) * c) tmp = 0.0 if (c <= -5e-9) tmp = t_1; elseif (c <= 45000.0) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-b) * z + N[(j * a), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -5e-9], t$95$1, If[LessEqual[c, 45000.0], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot a\right) \cdot c\\
\mathbf{if}\;c \leq -5 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 45000:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -5.0000000000000001e-9 or 45000 < c Initial program 74.9%
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
lower-*.f6459.6
Applied rewrites59.6%
if -5.0000000000000001e-9 < c < 45000Initial program 82.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.4
Applied rewrites52.4%
Final simplification56.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= i -1.4e+93) (* (* (- y) j) i) (if (<= i 7.4e+226) (* (fma (- a) t (* z y)) x) (* (* b t) i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.4e+93) {
tmp = (-y * j) * i;
} else if (i <= 7.4e+226) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = (b * t) * i;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -1.4e+93) tmp = Float64(Float64(Float64(-y) * j) * i); elseif (i <= 7.4e+226) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); else tmp = Float64(Float64(b * t) * i); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -1.4e+93], N[(N[((-y) * j), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[i, 7.4e+226], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(b * t), $MachinePrecision] * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.4 \cdot 10^{+93}:\\
\;\;\;\;\left(\left(-y\right) \cdot j\right) \cdot i\\
\mathbf{elif}\;i \leq 7.4 \cdot 10^{+226}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot t\right) \cdot i\\
\end{array}
\end{array}
if i < -1.39999999999999994e93Initial program 72.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6477.5
Applied rewrites77.5%
Taylor expanded in b around 0
Applied rewrites48.0%
if -1.39999999999999994e93 < i < 7.39999999999999963e226Initial program 80.8%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6450.3
Applied rewrites50.3%
if 7.39999999999999963e226 < i Initial program 70.5%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-lft-neg-inN/A
mul-1-negN/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6482.6
Applied rewrites82.6%
Taylor expanded in b around inf
Applied rewrites54.8%
Final simplification50.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* i t) b))) (if (<= i -14500000.0) t_1 (if (<= i 1.58e+90) (* (* z y) x) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) * b;
double tmp;
if (i <= -14500000.0) {
tmp = t_1;
} else if (i <= 1.58e+90) {
tmp = (z * y) * x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (i * t) * b
if (i <= (-14500000.0d0)) then
tmp = t_1
else if (i <= 1.58d+90) then
tmp = (z * y) * x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * t) * b;
double tmp;
if (i <= -14500000.0) {
tmp = t_1;
} else if (i <= 1.58e+90) {
tmp = (z * y) * x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (i * t) * b tmp = 0 if i <= -14500000.0: tmp = t_1 elif i <= 1.58e+90: tmp = (z * y) * x else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * t) * b) tmp = 0.0 if (i <= -14500000.0) tmp = t_1; elseif (i <= 1.58e+90) tmp = Float64(Float64(z * y) * x); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (i * t) * b; tmp = 0.0; if (i <= -14500000.0) tmp = t_1; elseif (i <= 1.58e+90) tmp = (z * y) * x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[i, -14500000.0], t$95$1, If[LessEqual[i, 1.58e+90], N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot t\right) \cdot b\\
\mathbf{if}\;i \leq -14500000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.58 \cdot 10^{+90}:\\
\;\;\;\;\left(z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.45e7 or 1.58e90 < i Initial program 73.0%
Taylor expanded in a around 0
sub-negN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
Applied rewrites64.9%
Taylor expanded in t around inf
Applied rewrites38.2%
if -1.45e7 < i < 1.58e90Initial program 82.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
+-commutativeN/A
mul-1-negN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6452.4
Applied rewrites52.4%
Taylor expanded in a around 0
Applied rewrites33.7%
Final simplification35.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* j c) a))) (if (<= c -2.6e-60) t_1 (if (<= c 4.1e-103) (* (* i t) b) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * c) * a;
double tmp;
if (c <= -2.6e-60) {
tmp = t_1;
} else if (c <= 4.1e-103) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = (j * c) * a
if (c <= (-2.6d-60)) then
tmp = t_1
else if (c <= 4.1d-103) then
tmp = (i * t) * b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (j * c) * a;
double tmp;
if (c <= -2.6e-60) {
tmp = t_1;
} else if (c <= 4.1e-103) {
tmp = (i * t) * b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * c) * a tmp = 0 if c <= -2.6e-60: tmp = t_1 elif c <= 4.1e-103: tmp = (i * t) * b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * c) * a) tmp = 0.0 if (c <= -2.6e-60) tmp = t_1; elseif (c <= 4.1e-103) tmp = Float64(Float64(i * t) * b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * c) * a; tmp = 0.0; if (c <= -2.6e-60) tmp = t_1; elseif (c <= 4.1e-103) tmp = (i * t) * b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[c, -2.6e-60], t$95$1, If[LessEqual[c, 4.1e-103], N[(N[(i * t), $MachinePrecision] * b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(j \cdot c\right) \cdot a\\
\mathbf{if}\;c \leq -2.6 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq 4.1 \cdot 10^{-103}:\\
\;\;\;\;\left(i \cdot t\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.5999999999999998e-60 or 4.09999999999999996e-103 < c Initial program 77.0%
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.9
Applied rewrites46.9%
Taylor expanded in c around inf
Applied rewrites32.2%
if -2.5999999999999998e-60 < c < 4.09999999999999996e-103Initial program 81.4%
Taylor expanded in a around 0
sub-negN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-commutativeN/A
lower-fma.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
Applied rewrites65.5%
Taylor expanded in t around inf
Applied rewrites30.7%
Final simplification31.6%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j c) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * c) * a;
}
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 = (j * c) * a
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 (j * c) * a;
}
def code(x, y, z, t, a, b, c, i, j): return (j * c) * a
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * c) * a) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * c) * a; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * c), $MachinePrecision] * a), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot c\right) \cdot a
\end{array}
Initial program 78.7%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in c around inf
Applied rewrites21.8%
(FPCore (x y z t a b c i j) :precision binary64 (* (* j a) c))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (j * a) * c;
}
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 = (j * a) * c
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 (j * a) * c;
}
def code(x, y, z, t, a, b, c, i, j): return (j * a) * c
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(j * a) * c) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (j * a) * c; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(j * a), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}
\\
\left(j \cdot a\right) \cdot c
\end{array}
Initial program 78.7%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6439.1
Applied rewrites39.1%
Taylor expanded in c around inf
Applied rewrites21.8%
Applied rewrites21.5%
(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 2024277
(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)))))