
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(-
(* (- (* c t) (* i y)) j)
(- (* (- (* a t) (* z y)) x) (* (- (* i a) (* c z)) b)))))
(if (<= t_1 INFINITY) t_1 (* (fma (- x) a (* j c)) t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (((c * t) - (i * y)) * j) - ((((a * t) - (z * y)) * x) - (((i * a) - (c * z)) * b));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(-x, a, (j * c)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(Float64(c * t) - Float64(i * y)) * j) - Float64(Float64(Float64(Float64(a * t) - Float64(z * y)) * x) - Float64(Float64(Float64(i * a) - Float64(c * z)) * b))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(fma(Float64(-x), a, Float64(j * c)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision] - N[(N[(N[(N[(a * t), $MachinePrecision] - N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] - N[(N[(N[(i * a), $MachinePrecision] - N[(c * z), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(c \cdot t - i \cdot y\right) \cdot j - \left(\left(a \cdot t - z \cdot y\right) \cdot x - \left(i \cdot a - c \cdot z\right) \cdot b\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 90.2%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6452.9
Applied rewrites52.9%
Final simplification81.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- y) j (* b a)) i)))
(if (<= i -3.5e+56)
t_1
(if (<= i -9e-240)
(* (fma t c (/ (fma (fma (- c) b (* y x)) z (* (* (- t) x) a)) j)) j)
(if (<= i 1.55e+71)
(fma (fma (- b) z (* j t)) 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 * a)) * i;
double tmp;
if (i <= -3.5e+56) {
tmp = t_1;
} else if (i <= -9e-240) {
tmp = fma(t, c, (fma(fma(-c, b, (y * x)), z, ((-t * x) * a)) / j)) * j;
} else if (i <= 1.55e+71) {
tmp = fma(fma(-b, z, (j * t)), 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 * a)) * i) tmp = 0.0 if (i <= -3.5e+56) tmp = t_1; elseif (i <= -9e-240) tmp = Float64(fma(t, c, Float64(fma(fma(Float64(-c), b, Float64(y * x)), z, Float64(Float64(Float64(-t) * x) * a)) / j)) * j); elseif (i <= 1.55e+71) tmp = fma(fma(Float64(-b), z, Float64(j * t)), 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 * a), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, If[LessEqual[i, -3.5e+56], t$95$1, If[LessEqual[i, -9e-240], N[(N[(t * c + N[(N[(N[((-c) * b + N[(y * x), $MachinePrecision]), $MachinePrecision] * z + N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], If[LessEqual[i, 1.55e+71], N[(N[((-b) * z + N[(j * t), $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 a\right) \cdot i\\
\mathbf{if}\;i \leq -3.5 \cdot 10^{+56}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq -9 \cdot 10^{-240}:\\
\;\;\;\;\mathsf{fma}\left(t, c, \frac{\mathsf{fma}\left(\mathsf{fma}\left(-c, b, y \cdot x\right), z, \left(\left(-t\right) \cdot x\right) \cdot a\right)}{j}\right) \cdot j\\
\mathbf{elif}\;i \leq 1.55 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, z, j \cdot t\right), c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -3.49999999999999999e56 or 1.55000000000000009e71 < i Initial program 53.0%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.8
Applied rewrites64.8%
if -3.49999999999999999e56 < i < -9.0000000000000003e-240Initial program 81.1%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites62.6%
Taylor expanded in j around -inf
Applied rewrites79.5%
if -9.0000000000000003e-240 < i < 1.55000000000000009e71Initial program 80.5%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites74.0%
Final simplification71.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (- b) z (* j t))) (t_2 (fma t_1 c (* (* z y) x))))
(if (<= c -2.55e+162)
(fma t_1 c (* (* (- a) t) x))
(if (<= c -2.7e-77)
t_2
(if (<= c -2.95e-236)
(* (fma (- y) j (* b a)) i)
(if (<= c 4.3e+14) (* (fma (- a) t (* z y)) x) 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(-b, z, (j * t));
double t_2 = fma(t_1, c, ((z * y) * x));
double tmp;
if (c <= -2.55e+162) {
tmp = fma(t_1, c, ((-a * t) * x));
} else if (c <= -2.7e-77) {
tmp = t_2;
} else if (c <= -2.95e-236) {
tmp = fma(-y, j, (b * a)) * i;
} else if (c <= 4.3e+14) {
tmp = fma(-a, t, (z * y)) * x;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(Float64(-b), z, Float64(j * t)) t_2 = fma(t_1, c, Float64(Float64(z * y) * x)) tmp = 0.0 if (c <= -2.55e+162) tmp = fma(t_1, c, Float64(Float64(Float64(-a) * t) * x)); elseif (c <= -2.7e-77) tmp = t_2; elseif (c <= -2.95e-236) tmp = Float64(fma(Float64(-y), j, Float64(b * a)) * i); elseif (c <= 4.3e+14) tmp = Float64(fma(Float64(-a), t, Float64(z * y)) * x); else tmp = t_2; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * c + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -2.55e+162], N[(t$95$1 * c + N[(N[((-a) * t), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -2.7e-77], t$95$2, If[LessEqual[c, -2.95e-236], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[c, 4.3e+14], N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot t\right)\\
t_2 := \mathsf{fma}\left(t\_1, c, \left(z \cdot y\right) \cdot x\right)\\
\mathbf{if}\;c \leq -2.55 \cdot 10^{+162}:\\
\;\;\;\;\mathsf{fma}\left(t\_1, c, \left(\left(-a\right) \cdot t\right) \cdot x\right)\\
\mathbf{elif}\;c \leq -2.7 \cdot 10^{-77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;c \leq -2.95 \cdot 10^{-236}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\
\mathbf{elif}\;c \leq 4.3 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if c < -2.5499999999999999e162Initial program 56.3%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites72.8%
Taylor expanded in a around inf
Applied rewrites80.3%
if -2.5499999999999999e162 < c < -2.7e-77 or 4.3e14 < c Initial program 64.9%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites71.7%
Taylor expanded in a around 0
Applied rewrites69.7%
if -2.7e-77 < c < -2.95000000000000007e-236Initial program 71.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.4
Applied rewrites59.4%
if -2.95000000000000007e-236 < c < 4.3e14Initial program 79.6%
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.9
Applied rewrites60.9%
Final simplification67.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma (fma (- b) z (* j t)) c (* (* z y) x)))
(t_2 (* (fma (- a) t (* z y)) x)))
(if (<= x -3e+42)
t_2
(if (<= x -3.75e-159)
t_1
(if (<= x 5.6e-222)
(* (fma (- y) j (* b a)) i)
(if (<= x 2.25e+73) 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(fma(-b, z, (j * t)), c, ((z * y) * x));
double t_2 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -3e+42) {
tmp = t_2;
} else if (x <= -3.75e-159) {
tmp = t_1;
} else if (x <= 5.6e-222) {
tmp = fma(-y, j, (b * a)) * i;
} else if (x <= 2.25e+73) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(fma(Float64(-b), z, Float64(j * t)), c, Float64(Float64(z * y) * x)) t_2 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -3e+42) tmp = t_2; elseif (x <= -3.75e-159) tmp = t_1; elseif (x <= 5.6e-222) tmp = Float64(fma(Float64(-y), j, Float64(b * a)) * i); elseif (x <= 2.25e+73) 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[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c + N[(N[(z * y), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -3e+42], t$95$2, If[LessEqual[x, -3.75e-159], t$95$1, If[LessEqual[x, 5.6e-222], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[x, 2.25e+73], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\mathsf{fma}\left(-b, z, j \cdot t\right), c, \left(z \cdot y\right) \cdot x\right)\\
t_2 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -3 \cdot 10^{+42}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.75 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-222}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{+73}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -3.00000000000000029e42 or 2.24999999999999992e73 < x Initial program 65.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-*.f6474.4
Applied rewrites74.4%
if -3.00000000000000029e42 < x < -3.75e-159 or 5.60000000000000014e-222 < x < 2.24999999999999992e73Initial program 70.8%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites62.7%
Taylor expanded in a around 0
Applied rewrites61.6%
if -3.75e-159 < x < 5.60000000000000014e-222Initial program 72.8%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6461.7
Applied rewrites61.7%
Final simplification67.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -7.5e+15)
(+ (* (* (- t) x) a) (* (- (* c t) (* i y)) j))
(if (<= j 1.3e+78)
(fma (fma (- b) z (* j t)) c (* (fma (- a) t (* z y)) x))
(if (<= j 2.12e+217)
(- (* (* (- c) z) b) (* (- (* i y) (* c t)) j))
(* (fma (- x) a (* j c)) t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -7.5e+15) {
tmp = ((-t * x) * a) + (((c * t) - (i * y)) * j);
} else if (j <= 1.3e+78) {
tmp = fma(fma(-b, z, (j * t)), c, (fma(-a, t, (z * y)) * x));
} else if (j <= 2.12e+217) {
tmp = ((-c * z) * b) - (((i * y) - (c * t)) * j);
} else {
tmp = fma(-x, a, (j * c)) * t;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -7.5e+15) tmp = Float64(Float64(Float64(Float64(-t) * x) * a) + Float64(Float64(Float64(c * t) - Float64(i * y)) * j)); elseif (j <= 1.3e+78) tmp = fma(fma(Float64(-b), z, Float64(j * t)), c, Float64(fma(Float64(-a), t, Float64(z * y)) * x)); elseif (j <= 2.12e+217) tmp = Float64(Float64(Float64(Float64(-c) * z) * b) - Float64(Float64(Float64(i * y) - Float64(c * t)) * j)); else tmp = Float64(fma(Float64(-x), a, Float64(j * c)) * t); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -7.5e+15], N[(N[(N[((-t) * x), $MachinePrecision] * a), $MachinePrecision] + N[(N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.3e+78], N[(N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c + N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.12e+217], N[(N[(N[((-c) * z), $MachinePrecision] * b), $MachinePrecision] - N[(N[(N[(i * y), $MachinePrecision] - N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision], N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -7.5 \cdot 10^{+15}:\\
\;\;\;\;\left(\left(-t\right) \cdot x\right) \cdot a + \left(c \cdot t - i \cdot y\right) \cdot j\\
\mathbf{elif}\;j \leq 1.3 \cdot 10^{+78}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-b, z, j \cdot t\right), c, \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\right)\\
\mathbf{elif}\;j \leq 2.12 \cdot 10^{+217}:\\
\;\;\;\;\left(\left(-c\right) \cdot z\right) \cdot b - \left(i \cdot y - c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\\
\end{array}
\end{array}
if j < -7.5e15Initial program 69.5%
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-/.f6469.4
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f6469.4
lift-*.f64N/A
*-commutativeN/A
lower-*.f6469.4
Applied rewrites69.4%
Taylor expanded in t around inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6470.0
Applied rewrites70.0%
if -7.5e15 < j < 1.3e78Initial program 72.6%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites68.4%
if 1.3e78 < j < 2.12000000000000001e217Initial program 61.2%
Taylor expanded in c around inf
associate-*r*N/A
lower-*.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6475.2
Applied rewrites75.2%
if 2.12000000000000001e217 < j Initial program 44.1%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6476.3
Applied rewrites76.3%
Final simplification70.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j t)) c))
(t_2 (* (fma (- y) j (* b a)) i))
(t_3 (* (fma (- a) t (* z y)) x)))
(if (<= x -1.58e+41)
t_3
(if (<= x -3.7e-55)
t_2
(if (<= x -3.15e-159)
t_1
(if (<= x 5.6e-222) t_2 (if (<= x 1.55e-31) t_1 t_3)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-b, z, (j * t)) * c;
double t_2 = fma(-y, j, (b * a)) * i;
double t_3 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -1.58e+41) {
tmp = t_3;
} else if (x <= -3.7e-55) {
tmp = t_2;
} else if (x <= -3.15e-159) {
tmp = t_1;
} else if (x <= 5.6e-222) {
tmp = t_2;
} else if (x <= 1.55e-31) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-b), z, Float64(j * t)) * c) t_2 = Float64(fma(Float64(-y), j, Float64(b * a)) * i) t_3 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.58e+41) tmp = t_3; elseif (x <= -3.7e-55) tmp = t_2; elseif (x <= -3.15e-159) tmp = t_1; elseif (x <= 5.6e-222) tmp = t_2; elseif (x <= 1.55e-31) tmp = t_1; else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-b) * z + N[(j * t), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, Block[{t$95$2 = N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision]}, Block[{t$95$3 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.58e+41], t$95$3, If[LessEqual[x, -3.7e-55], t$95$2, If[LessEqual[x, -3.15e-159], t$95$1, If[LessEqual[x, 5.6e-222], t$95$2, If[LessEqual[x, 1.55e-31], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-b, z, j \cdot t\right) \cdot c\\
t_2 := \mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\
t_3 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.58 \cdot 10^{+41}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -3.7 \cdot 10^{-55}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.15 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{-222}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -1.5799999999999999e41 or 1.55e-31 < x Initial program 66.6%
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-*.f6471.0
Applied rewrites71.0%
if -1.5799999999999999e41 < x < -3.69999999999999985e-55 or -3.1499999999999999e-159 < x < 5.60000000000000014e-222Initial program 72.2%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6464.0
Applied rewrites64.0%
if -3.69999999999999985e-55 < x < -3.1499999999999999e-159 or 5.60000000000000014e-222 < x < 1.55e-31Initial program 68.8%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.4
Applied rewrites59.4%
Final simplification66.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -1.58e+41)
t_1
(if (<= x -1.35e-76)
(* (fma (- y) j (* b a)) i)
(if (<= x 12.5) (* (* (- c (/ (* i y) t)) t) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -1.58e+41) {
tmp = t_1;
} else if (x <= -1.35e-76) {
tmp = fma(-y, j, (b * a)) * i;
} else if (x <= 12.5) {
tmp = ((c - ((i * y) / t)) * t) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -1.58e+41) tmp = t_1; elseif (x <= -1.35e-76) tmp = Float64(fma(Float64(-y), j, Float64(b * a)) * i); elseif (x <= 12.5) tmp = Float64(Float64(Float64(c - Float64(Float64(i * y) / t)) * t) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.58e+41], t$95$1, If[LessEqual[x, -1.35e-76], N[(N[((-y) * j + N[(b * a), $MachinePrecision]), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[x, 12.5], N[(N[(N[(c - N[(N[(i * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1.58 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-76}:\\
\;\;\;\;\mathsf{fma}\left(-y, j, b \cdot a\right) \cdot i\\
\mathbf{elif}\;x \leq 12.5:\\
\;\;\;\;\left(\left(c - \frac{i \cdot y}{t}\right) \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.5799999999999999e41 or 12.5 < x Initial program 66.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-*.f6471.3
Applied rewrites71.3%
if -1.5799999999999999e41 < x < -1.35e-76Initial program 63.1%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6463.1
Applied rewrites63.1%
if -1.35e-76 < x < 12.5Initial program 73.2%
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
lower-*.f6451.6
Applied rewrites51.6%
Taylor expanded in t around inf
Applied rewrites54.2%
Final simplification63.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- b) z (* j t)) c)))
(if (<= c -2.3e+89)
t_1
(if (<= c -5.6e-80)
(* (fma (- b) c (* y x)) z)
(if (<= c 6.7e+47) (* (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 * t)) * c;
double tmp;
if (c <= -2.3e+89) {
tmp = t_1;
} else if (c <= -5.6e-80) {
tmp = fma(-b, c, (y * x)) * z;
} else if (c <= 6.7e+47) {
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 * t)) * c) tmp = 0.0 if (c <= -2.3e+89) tmp = t_1; elseif (c <= -5.6e-80) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); elseif (c <= 6.7e+47) 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 * t), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]}, If[LessEqual[c, -2.3e+89], t$95$1, If[LessEqual[c, -5.6e-80], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[c, 6.7e+47], 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 t\right) \cdot c\\
\mathbf{if}\;c \leq -2.3 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;c \leq -5.6 \cdot 10^{-80}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{elif}\;c \leq 6.7 \cdot 10^{+47}:\\
\;\;\;\;\mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if c < -2.2999999999999999e89 or 6.69999999999999973e47 < c Initial program 56.3%
Taylor expanded in c around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6470.7
Applied rewrites70.7%
if -2.2999999999999999e89 < c < -5.59999999999999978e-80Initial program 75.1%
Taylor expanded in z 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-*.f6457.6
Applied rewrites57.6%
if -5.59999999999999978e-80 < c < 6.69999999999999973e47Initial program 78.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-*.f6453.5
Applied rewrites53.5%
Final simplification61.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -6.7e+44)
t_1
(if (<= x -2.6e-219)
(* (fma (- b) c (* y x)) z)
(if (<= x 2.6e-39) (* (* c t) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -6.7e+44) {
tmp = t_1;
} else if (x <= -2.6e-219) {
tmp = fma(-b, c, (y * x)) * z;
} else if (x <= 2.6e-39) {
tmp = (c * t) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -6.7e+44) tmp = t_1; elseif (x <= -2.6e-219) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); elseif (x <= 2.6e-39) tmp = Float64(Float64(c * t) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -6.7e+44], t$95$1, If[LessEqual[x, -2.6e-219], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[x, 2.6e-39], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -6.7 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-219}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-39}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.70000000000000035e44 or 2.6e-39 < x Initial program 66.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-*.f6471.3
Applied rewrites71.3%
if -6.70000000000000035e44 < x < -2.60000000000000002e-219Initial program 69.4%
Taylor expanded in z 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-*.f6443.4
Applied rewrites43.4%
if -2.60000000000000002e-219 < x < 2.6e-39Initial program 72.9%
Taylor expanded in j around inf
*-commutativeN/A
lower-*.f64N/A
cancel-sign-sub-invN/A
+-commutativeN/A
neg-mul-1N/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
lower-*.f6450.0
Applied rewrites50.0%
Taylor expanded in c around inf
Applied rewrites36.6%
Final simplification55.6%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* (fma (- a) t (* z y)) x)))
(if (<= x -1e+41)
t_1
(if (<= x -3.9e-273)
(* (* i b) a)
(if (<= x 2.6e-39) (* (* c t) j) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -1e+41) {
tmp = t_1;
} else if (x <= -3.9e-273) {
tmp = (i * b) * a;
} else if (x <= 2.6e-39) {
tmp = (c * t) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -1e+41) tmp = t_1; elseif (x <= -3.9e-273) tmp = Float64(Float64(i * b) * a); elseif (x <= 2.6e-39) tmp = Float64(Float64(c * t) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1e+41], t$95$1, If[LessEqual[x, -3.9e-273], N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision], If[LessEqual[x, 2.6e-39], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -1 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.9 \cdot 10^{-273}:\\
\;\;\;\;\left(i \cdot b\right) \cdot a\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-39}:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.00000000000000001e41 or 2.6e-39 < x Initial program 66.6%
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-*.f6471.0
Applied rewrites71.0%
if -1.00000000000000001e41 < x < -3.9000000000000004e-273Initial program 68.3%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.5
Applied rewrites56.5%
Taylor expanded in b around inf
Applied rewrites35.4%
if -3.9000000000000004e-273 < x < 2.6e-39Initial program 73.6%
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
lower-*.f6450.4
Applied rewrites50.4%
Taylor expanded in c around inf
Applied rewrites38.3%
Final simplification54.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (fma (- x) a (* j c)) t))) (if (<= t -3.2e+67) t_1 (if (<= t 6e-31) (* (fma (- b) c (* y x)) z) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-x, a, (j * c)) * t;
double tmp;
if (t <= -3.2e+67) {
tmp = t_1;
} else if (t <= 6e-31) {
tmp = fma(-b, c, (y * x)) * z;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-x), a, Float64(j * c)) * t) tmp = 0.0 if (t <= -3.2e+67) tmp = t_1; elseif (t <= 6e-31) tmp = Float64(fma(Float64(-b), c, Float64(y * x)) * z); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-x) * a + N[(j * c), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, -3.2e+67], t$95$1, If[LessEqual[t, 6e-31], N[(N[((-b) * c + N[(y * x), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-x, a, j \cdot c\right) \cdot t\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{+67}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-31}:\\
\;\;\;\;\mathsf{fma}\left(-b, c, y \cdot x\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.19999999999999983e67 or 5.99999999999999962e-31 < t Initial program 58.2%
Taylor expanded in t around inf
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6466.0
Applied rewrites66.0%
if -3.19999999999999983e67 < t < 5.99999999999999962e-31Initial program 78.1%
Taylor expanded in z 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-*.f6455.6
Applied rewrites55.6%
Final simplification60.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (fma (- a) t (* z y)) x))) (if (<= x -5.8e+41) t_1 (if (<= x 12.5) (* (fma (- i) y (* c t)) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = fma(-a, t, (z * y)) * x;
double tmp;
if (x <= -5.8e+41) {
tmp = t_1;
} else if (x <= 12.5) {
tmp = fma(-i, y, (c * t)) * j;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(fma(Float64(-a), t, Float64(z * y)) * x) tmp = 0.0 if (x <= -5.8e+41) tmp = t_1; elseif (x <= 12.5) tmp = Float64(fma(Float64(-i), y, Float64(c * t)) * j); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[((-a) * t + N[(z * y), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -5.8e+41], t$95$1, If[LessEqual[x, 12.5], N[(N[((-i) * y + N[(c * t), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(-a, t, z \cdot y\right) \cdot x\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+41}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 12.5:\\
\;\;\;\;\mathsf{fma}\left(-i, y, c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.79999999999999977e41 or 12.5 < x Initial program 66.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-*.f6471.3
Applied rewrites71.3%
if -5.79999999999999977e41 < x < 12.5Initial program 71.3%
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
lower-*.f6449.3
Applied rewrites49.3%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* z y) x))) (if (<= z -7.8e-32) t_1 (if (<= z 210000000.0) (* (* c t) j) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -7.8e-32) {
tmp = t_1;
} else if (z <= 210000000.0) {
tmp = (c * t) * j;
} 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 <= (-7.8d-32)) then
tmp = t_1
else if (z <= 210000000.0d0) then
tmp = (c * t) * j
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 <= -7.8e-32) {
tmp = t_1;
} else if (z <= 210000000.0) {
tmp = (c * t) * j;
} 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 <= -7.8e-32: tmp = t_1 elif z <= 210000000.0: tmp = (c * t) * j 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 <= -7.8e-32) tmp = t_1; elseif (z <= 210000000.0) tmp = Float64(Float64(c * t) * j); 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 <= -7.8e-32) tmp = t_1; elseif (z <= 210000000.0) tmp = (c * t) * j; 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, -7.8e-32], t$95$1, If[LessEqual[z, 210000000.0], N[(N[(c * t), $MachinePrecision] * j), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -7.8 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 210000000:\\
\;\;\;\;\left(c \cdot t\right) \cdot j\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.8000000000000003e-32 or 2.1e8 < z Initial program 68.0%
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.8
Applied rewrites52.8%
Taylor expanded in a around 0
Applied rewrites43.0%
if -7.8000000000000003e-32 < z < 2.1e8Initial program 69.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
lower-*.f6451.4
Applied rewrites51.4%
Taylor expanded in c around inf
Applied rewrites37.4%
Final simplification40.5%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* z y) x))) (if (<= z -8e-32) t_1 (if (<= z 205000000.0) (* (* j t) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (z * y) * x;
double tmp;
if (z <= -8e-32) {
tmp = t_1;
} else if (z <= 205000000.0) {
tmp = (j * t) * 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 = (z * y) * x
if (z <= (-8d-32)) then
tmp = t_1
else if (z <= 205000000.0d0) then
tmp = (j * t) * 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 = (z * y) * x;
double tmp;
if (z <= -8e-32) {
tmp = t_1;
} else if (z <= 205000000.0) {
tmp = (j * t) * c;
} 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 <= -8e-32: tmp = t_1 elif z <= 205000000.0: tmp = (j * t) * c 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 <= -8e-32) tmp = t_1; elseif (z <= 205000000.0) tmp = Float64(Float64(j * t) * c); 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 <= -8e-32) tmp = t_1; elseif (z <= 205000000.0) tmp = (j * t) * 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[(z * y), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[z, -8e-32], t$95$1, If[LessEqual[z, 205000000.0], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot y\right) \cdot x\\
\mathbf{if}\;z \leq -8 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 205000000:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.00000000000000045e-32 or 2.05e8 < z Initial program 68.0%
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.8
Applied rewrites52.8%
Taylor expanded in a around 0
Applied rewrites43.0%
if -8.00000000000000045e-32 < z < 2.05e8Initial program 69.5%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites57.5%
Taylor expanded in j around inf
Applied rewrites35.0%
Final simplification39.4%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* (* i b) a))) (if (<= i -2.55e-28) t_1 (if (<= i 7.5e-53) (* (* j t) c) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (i * b) * a;
double tmp;
if (i <= -2.55e-28) {
tmp = t_1;
} else if (i <= 7.5e-53) {
tmp = (j * t) * 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 = (i * b) * a
if (i <= (-2.55d-28)) then
tmp = t_1
else if (i <= 7.5d-53) then
tmp = (j * t) * 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 = (i * b) * a;
double tmp;
if (i <= -2.55e-28) {
tmp = t_1;
} else if (i <= 7.5e-53) {
tmp = (j * t) * c;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (i * b) * a tmp = 0 if i <= -2.55e-28: tmp = t_1 elif i <= 7.5e-53: tmp = (j * t) * c else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(i * b) * a) tmp = 0.0 if (i <= -2.55e-28) tmp = t_1; elseif (i <= 7.5e-53) tmp = Float64(Float64(j * t) * c); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (i * b) * a; tmp = 0.0; if (i <= -2.55e-28) tmp = t_1; elseif (i <= 7.5e-53) tmp = (j * t) * 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[(i * b), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[i, -2.55e-28], t$95$1, If[LessEqual[i, 7.5e-53], N[(N[(j * t), $MachinePrecision] * c), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(i \cdot b\right) \cdot a\\
\mathbf{if}\;i \leq -2.55 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 7.5 \cdot 10^{-53}:\\
\;\;\;\;\left(j \cdot t\right) \cdot c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -2.55000000000000004e-28 or 7.5000000000000001e-53 < i Initial program 58.6%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6459.8
Applied rewrites59.8%
Taylor expanded in b around inf
Applied rewrites37.8%
if -2.55000000000000004e-28 < i < 7.5000000000000001e-53Initial program 81.5%
Taylor expanded in i around 0
associate--l+N/A
sub-negN/A
+-commutativeN/A
associate-+r+N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
distribute-lft-neg-outN/A
mul-1-negN/A
distribute-rgt-inN/A
mul-1-negN/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites74.5%
Taylor expanded in j around inf
Applied rewrites30.5%
Final simplification34.6%
(FPCore (x y z t a b c i j) :precision binary64 (* (* i b) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return (i * b) * 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 = (i * b) * 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 (i * b) * a;
}
def code(x, y, z, t, a, b, c, i, j): return (i * b) * a
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(i * b) * a) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = (i * b) * a; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(i * b), $MachinePrecision] * a), $MachinePrecision]
\begin{array}{l}
\\
\left(i \cdot b\right) \cdot a
\end{array}
Initial program 68.7%
Taylor expanded in i around inf
*-commutativeN/A
lower-*.f64N/A
sub-negN/A
*-commutativeN/A
associate-*r*N/A
mul-1-negN/A
remove-double-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6440.2
Applied rewrites40.2%
Taylor expanded in b around inf
Applied rewrites23.7%
Final simplification23.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(/
(* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
(+ (* c t) (* i y)))))
(t_2
(-
(* x (- (* z y) (* a t)))
(- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
(if (< t -8.120978919195912e-33)
t_2
(if (< t -4.712553818218485e-169)
t_1
(if (< t -7.633533346031584e-308)
t_2
(if (< t 1.0535888557455487e-139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
if (t < (-8.120978919195912d-33)) then
tmp = t_2
else if (t < (-4.712553818218485d-169)) then
tmp = t_1
else if (t < (-7.633533346031584d-308)) then
tmp = t_2
else if (t < 1.0535888557455487d-139) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y))) t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)) tmp = 0 if t < -8.120978919195912e-33: tmp = t_2 elif t < -4.712553818218485e-169: tmp = t_1 elif t < -7.633533346031584e-308: tmp = t_2 elif t < 1.0535888557455487e-139: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y)))) t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j))) tmp = 0.0 if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y))); t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)); tmp = 0.0; if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024249
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1015122364899489/125000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -942510763643697/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (if (< t -238547917063487/3125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 10535888557455487/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2) (pow (* i y) 2))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))