
(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 15 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
(-
(* j (- (* t c) (* y i)))
(+ (* b (- (* z c) (* a i))) (* x (- (* t a) (* y z)))))))
(if (<= t_1 INFINITY) t_1 (* (* x c) (/ (fma z y (* t (- 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 = (j * ((t * c) - (y * i))) - ((b * ((z * c) - (a * i))) + (x * ((t * a) - (y * z))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = (x * c) * (fma(z, y, (t * -a)) / c);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * Float64(Float64(t * c) - Float64(y * i))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) + Float64(x * Float64(Float64(t * a) - Float64(y * z))))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(Float64(x * c) * Float64(fma(z, y, Float64(t * Float64(-a))) / c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(t * a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(N[(x * c), $MachinePrecision] * N[(N[(z * y + N[(t * (-a)), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(t \cdot c - y \cdot i\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) + x \cdot \left(t \cdot a - y \cdot z\right)\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot c\right) \cdot \frac{\mathsf{fma}\left(z, y, t \cdot \left(-a\right)\right)}{c}\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 91.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 x around -inf
Applied rewrites24.8%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites44.9%
Taylor expanded in x around inf
Applied rewrites57.6%
Final simplification84.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (fma b (- z) (* t j))))
(if (<= c -3.2e+83)
(* c t_1)
(if (<= c -9.5e-210)
(fma y (fma j (- i) (* x z)) (* z (* b (- c))))
(if (<= c 3.2e+83) (* x (- (* y z) (* t a))) (* (* x c) (/ t_1 x)))))))
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, (t * j));
double tmp;
if (c <= -3.2e+83) {
tmp = c * t_1;
} else if (c <= -9.5e-210) {
tmp = fma(y, fma(j, -i, (x * z)), (z * (b * -c)));
} else if (c <= 3.2e+83) {
tmp = x * ((y * z) - (t * a));
} else {
tmp = (x * c) * (t_1 / x);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = fma(b, Float64(-z), Float64(t * j)) tmp = 0.0 if (c <= -3.2e+83) tmp = Float64(c * t_1); elseif (c <= -9.5e-210) tmp = fma(y, fma(j, Float64(-i), Float64(x * z)), Float64(z * Float64(b * Float64(-c)))); elseif (c <= 3.2e+83) tmp = Float64(x * Float64(Float64(y * z) - Float64(t * a))); else tmp = Float64(Float64(x * c) * Float64(t_1 / x)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * (-z) + N[(t * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[c, -3.2e+83], N[(c * t$95$1), $MachinePrecision], If[LessEqual[c, -9.5e-210], N[(y * N[(j * (-i) + N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 3.2e+83], N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * c), $MachinePrecision] * N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(b, -z, t \cdot j\right)\\
\mathbf{if}\;c \leq -3.2 \cdot 10^{+83}:\\
\;\;\;\;c \cdot t\_1\\
\mathbf{elif}\;c \leq -9.5 \cdot 10^{-210}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(j, -i, x \cdot z\right), z \cdot \left(b \cdot \left(-c\right)\right)\right)\\
\mathbf{elif}\;c \leq 3.2 \cdot 10^{+83}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot c\right) \cdot \frac{t\_1}{x}\\
\end{array}
\end{array}
if c < -3.1999999999999999e83Initial program 60.8%
Taylor expanded in c around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6479.7
Applied rewrites79.7%
if -3.1999999999999999e83 < c < -9.4999999999999997e-210Initial program 81.9%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
Applied rewrites71.1%
Taylor expanded in c around inf
Applied rewrites66.1%
if -9.4999999999999997e-210 < c < 3.1999999999999999e83Initial program 74.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6462.0
Applied rewrites62.0%
if 3.1999999999999999e83 < c Initial program 76.1%
Taylor expanded in x around -inf
Applied rewrites81.6%
Taylor expanded in c around inf
Applied rewrites75.0%
Final simplification68.5%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= x -1.25e+63)
(* x (- (* y z) (* t a)))
(if (<= x 4.4e+70)
(fma y (fma j (- i) (* x z)) (* b (fma c (- z) (* a i))))
(* (* x c) (/ (fma z y (* t (- a))) c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (x <= -1.25e+63) {
tmp = x * ((y * z) - (t * a));
} else if (x <= 4.4e+70) {
tmp = fma(y, fma(j, -i, (x * z)), (b * fma(c, -z, (a * i))));
} else {
tmp = (x * c) * (fma(z, y, (t * -a)) / c);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (x <= -1.25e+63) tmp = Float64(x * Float64(Float64(y * z) - Float64(t * a))); elseif (x <= 4.4e+70) tmp = fma(y, fma(j, Float64(-i), Float64(x * z)), Float64(b * fma(c, Float64(-z), Float64(a * i)))); else tmp = Float64(Float64(x * c) * Float64(fma(z, y, Float64(t * Float64(-a))) / c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[x, -1.25e+63], N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e+70], N[(y * N[(j * (-i) + N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(b * N[(c * (-z) + N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * c), $MachinePrecision] * N[(N[(z * y + N[(t * (-a)), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.25 \cdot 10^{+63}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+70}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(j, -i, x \cdot z\right), b \cdot \mathsf{fma}\left(c, -z, a \cdot i\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot c\right) \cdot \frac{\mathsf{fma}\left(z, y, t \cdot \left(-a\right)\right)}{c}\\
\end{array}
\end{array}
if x < -1.25000000000000003e63Initial program 78.9%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6485.0
Applied rewrites85.0%
if -1.25000000000000003e63 < x < 4.40000000000000001e70Initial program 72.6%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
Applied rewrites65.4%
if 4.40000000000000001e70 < x Initial program 71.9%
Taylor expanded in x around -inf
Applied rewrites79.5%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites74.0%
Taylor expanded in x around inf
Applied rewrites72.5%
Final simplification70.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= t -2.4e+102)
(* c (* t (fma (- a) (/ x c) j)))
(if (<= t 1.5e+61)
(fma y (fma j (- i) (* x z)) (* z (* b (- c))))
(* t (fma j c (* x (- a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (t <= -2.4e+102) {
tmp = c * (t * fma(-a, (x / c), j));
} else if (t <= 1.5e+61) {
tmp = fma(y, fma(j, -i, (x * z)), (z * (b * -c)));
} else {
tmp = t * fma(j, c, (x * -a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (t <= -2.4e+102) tmp = Float64(c * Float64(t * fma(Float64(-a), Float64(x / c), j))); elseif (t <= 1.5e+61) tmp = fma(y, fma(j, Float64(-i), Float64(x * z)), Float64(z * Float64(b * Float64(-c)))); else tmp = Float64(t * fma(j, c, Float64(x * Float64(-a)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[t, -2.4e+102], N[(c * N[(t * N[((-a) * N[(x / c), $MachinePrecision] + j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+61], N[(y * N[(j * (-i) + N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(j * c + N[(x * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+102}:\\
\;\;\;\;c \cdot \left(t \cdot \mathsf{fma}\left(-a, \frac{x}{c}, j\right)\right)\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+61}:\\
\;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(j, -i, x \cdot z\right), z \cdot \left(b \cdot \left(-c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(j, c, x \cdot \left(-a\right)\right)\\
\end{array}
\end{array}
if t < -2.39999999999999994e102Initial program 65.9%
Taylor expanded in x around -inf
Applied rewrites69.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites72.3%
Taylor expanded in t around inf
Applied rewrites72.7%
if -2.39999999999999994e102 < t < 1.5e61Initial program 78.3%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
Applied rewrites67.6%
Taylor expanded in c around inf
Applied rewrites63.9%
if 1.5e61 < t Initial program 63.7%
Taylor expanded in t around inf
lower-*.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f6470.4
Applied rewrites70.4%
Final simplification66.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -1.02e-21)
(* z (* b (- c)))
(if (<= c -7.5e-210)
(* j (* i (- y)))
(if (<= c 2.4e-285)
(* i (* a b))
(if (<= c 34000.0) (* x (* t (- a))) (* j (* t c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -1.02e-21) {
tmp = z * (b * -c);
} else if (c <= -7.5e-210) {
tmp = j * (i * -y);
} else if (c <= 2.4e-285) {
tmp = i * (a * b);
} else if (c <= 34000.0) {
tmp = x * (t * -a);
} else {
tmp = j * (t * c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= (-1.02d-21)) then
tmp = z * (b * -c)
else if (c <= (-7.5d-210)) then
tmp = j * (i * -y)
else if (c <= 2.4d-285) then
tmp = i * (a * b)
else if (c <= 34000.0d0) then
tmp = x * (t * -a)
else
tmp = j * (t * c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -1.02e-21) {
tmp = z * (b * -c);
} else if (c <= -7.5e-210) {
tmp = j * (i * -y);
} else if (c <= 2.4e-285) {
tmp = i * (a * b);
} else if (c <= 34000.0) {
tmp = x * (t * -a);
} else {
tmp = j * (t * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -1.02e-21: tmp = z * (b * -c) elif c <= -7.5e-210: tmp = j * (i * -y) elif c <= 2.4e-285: tmp = i * (a * b) elif c <= 34000.0: tmp = x * (t * -a) else: tmp = j * (t * c) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -1.02e-21) tmp = Float64(z * Float64(b * Float64(-c))); elseif (c <= -7.5e-210) tmp = Float64(j * Float64(i * Float64(-y))); elseif (c <= 2.4e-285) tmp = Float64(i * Float64(a * b)); elseif (c <= 34000.0) tmp = Float64(x * Float64(t * Float64(-a))); else tmp = Float64(j * Float64(t * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -1.02e-21) tmp = z * (b * -c); elseif (c <= -7.5e-210) tmp = j * (i * -y); elseif (c <= 2.4e-285) tmp = i * (a * b); elseif (c <= 34000.0) tmp = x * (t * -a); else tmp = j * (t * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -1.02e-21], N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -7.5e-210], N[(j * N[(i * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.4e-285], N[(i * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 34000.0], N[(x * N[(t * (-a)), $MachinePrecision]), $MachinePrecision], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.02 \cdot 10^{-21}:\\
\;\;\;\;z \cdot \left(b \cdot \left(-c\right)\right)\\
\mathbf{elif}\;c \leq -7.5 \cdot 10^{-210}:\\
\;\;\;\;j \cdot \left(i \cdot \left(-y\right)\right)\\
\mathbf{elif}\;c \leq 2.4 \cdot 10^{-285}:\\
\;\;\;\;i \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;c \leq 34000:\\
\;\;\;\;x \cdot \left(t \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\end{array}
\end{array}
if c < -1.02000000000000004e-21Initial program 66.9%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
Applied rewrites62.0%
Taylor expanded in c around inf
Applied rewrites45.2%
if -1.02000000000000004e-21 < c < -7.4999999999999997e-210Initial program 82.1%
Taylor expanded in x around -inf
Applied rewrites84.6%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites57.1%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6444.9
Applied rewrites44.9%
Taylor expanded in y around inf
Applied rewrites44.7%
if -7.4999999999999997e-210 < c < 2.4e-285Initial program 79.0%
Taylor expanded in i around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6450.9
Applied rewrites50.9%
Taylor expanded in j around 0
Applied rewrites45.4%
if 2.4e-285 < c < 34000Initial program 78.7%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6467.6
Applied rewrites67.6%
Taylor expanded in y around 0
Applied rewrites43.5%
if 34000 < c Initial program 68.9%
Taylor expanded in x around -inf
Applied rewrites74.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites92.6%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.2
Applied rewrites56.2%
Taylor expanded in y around 0
Applied rewrites45.5%
Final simplification44.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -1.02e-21)
(* z (* b (- c)))
(if (<= c -1.02e-228)
(* j (* i (- y)))
(if (<= c 9.2e-143)
(* x (* y z))
(if (<= c 34000.0) (* a (* x (- t))) (* j (* t c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -1.02e-21) {
tmp = z * (b * -c);
} else if (c <= -1.02e-228) {
tmp = j * (i * -y);
} else if (c <= 9.2e-143) {
tmp = x * (y * z);
} else if (c <= 34000.0) {
tmp = a * (x * -t);
} else {
tmp = j * (t * c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= (-1.02d-21)) then
tmp = z * (b * -c)
else if (c <= (-1.02d-228)) then
tmp = j * (i * -y)
else if (c <= 9.2d-143) then
tmp = x * (y * z)
else if (c <= 34000.0d0) then
tmp = a * (x * -t)
else
tmp = j * (t * c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -1.02e-21) {
tmp = z * (b * -c);
} else if (c <= -1.02e-228) {
tmp = j * (i * -y);
} else if (c <= 9.2e-143) {
tmp = x * (y * z);
} else if (c <= 34000.0) {
tmp = a * (x * -t);
} else {
tmp = j * (t * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -1.02e-21: tmp = z * (b * -c) elif c <= -1.02e-228: tmp = j * (i * -y) elif c <= 9.2e-143: tmp = x * (y * z) elif c <= 34000.0: tmp = a * (x * -t) else: tmp = j * (t * c) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -1.02e-21) tmp = Float64(z * Float64(b * Float64(-c))); elseif (c <= -1.02e-228) tmp = Float64(j * Float64(i * Float64(-y))); elseif (c <= 9.2e-143) tmp = Float64(x * Float64(y * z)); elseif (c <= 34000.0) tmp = Float64(a * Float64(x * Float64(-t))); else tmp = Float64(j * Float64(t * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -1.02e-21) tmp = z * (b * -c); elseif (c <= -1.02e-228) tmp = j * (i * -y); elseif (c <= 9.2e-143) tmp = x * (y * z); elseif (c <= 34000.0) tmp = a * (x * -t); else tmp = j * (t * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -1.02e-21], N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, -1.02e-228], N[(j * N[(i * (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.2e-143], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 34000.0], N[(a * N[(x * (-t)), $MachinePrecision]), $MachinePrecision], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -1.02 \cdot 10^{-21}:\\
\;\;\;\;z \cdot \left(b \cdot \left(-c\right)\right)\\
\mathbf{elif}\;c \leq -1.02 \cdot 10^{-228}:\\
\;\;\;\;j \cdot \left(i \cdot \left(-y\right)\right)\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{-143}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;c \leq 34000:\\
\;\;\;\;a \cdot \left(x \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\end{array}
\end{array}
if c < -1.02000000000000004e-21Initial program 66.9%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
Applied rewrites62.0%
Taylor expanded in c around inf
Applied rewrites45.2%
if -1.02000000000000004e-21 < c < -1.02e-228Initial program 82.3%
Taylor expanded in x around -inf
Applied rewrites82.3%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites54.0%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6443.6
Applied rewrites43.6%
Taylor expanded in y around inf
Applied rewrites39.2%
if -1.02e-228 < c < 9.20000000000000045e-143Initial program 77.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6463.7
Applied rewrites63.7%
Taylor expanded in y around inf
Applied rewrites39.7%
if 9.20000000000000045e-143 < c < 34000Initial program 80.9%
Taylor expanded in a around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6456.7
Applied rewrites56.7%
Taylor expanded in t around inf
Applied rewrites53.4%
if 34000 < c Initial program 68.9%
Taylor expanded in x around -inf
Applied rewrites74.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites92.6%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.2
Applied rewrites56.2%
Taylor expanded in y around 0
Applied rewrites45.5%
Final simplification44.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* t a)))))
(if (<= x -2.3e-32)
t_1
(if (<= x 8.2e-170)
(* c (fma b (- z) (* t j)))
(if (<= x 2.8e+20) (* b (fma c (- z) (* a 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 = x * ((y * z) - (t * a));
double tmp;
if (x <= -2.3e-32) {
tmp = t_1;
} else if (x <= 8.2e-170) {
tmp = c * fma(b, -z, (t * j));
} else if (x <= 2.8e+20) {
tmp = b * fma(c, -z, (a * i));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(t * a))) tmp = 0.0 if (x <= -2.3e-32) tmp = t_1; elseif (x <= 8.2e-170) tmp = Float64(c * fma(b, Float64(-z), Float64(t * j))); elseif (x <= 2.8e+20) tmp = Float64(b * fma(c, Float64(-z), Float64(a * i))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.3e-32], t$95$1, If[LessEqual[x, 8.2e-170], N[(c * N[(b * (-z) + N[(t * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+20], N[(b * N[(c * (-z) + N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{-170}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(b, -z, t \cdot j\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+20}:\\
\;\;\;\;b \cdot \mathsf{fma}\left(c, -z, a \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.3000000000000001e-32 or 2.8e20 < x Initial program 76.0%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6472.9
Applied rewrites72.9%
if -2.3000000000000001e-32 < x < 8.19999999999999931e-170Initial program 68.6%
Taylor expanded in c around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6459.4
Applied rewrites59.4%
if 8.19999999999999931e-170 < x < 2.8e20Initial program 76.6%
Taylor expanded in b around inf
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6466.6
Applied rewrites66.6%
Final simplification67.7%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= c -5.5e+26)
(* z (* b (- c)))
(if (<= c 9.2e-143)
(* x (* y z))
(if (<= c 34000.0) (* a (* x (- t))) (* j (* t c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -5.5e+26) {
tmp = z * (b * -c);
} else if (c <= 9.2e-143) {
tmp = x * (y * z);
} else if (c <= 34000.0) {
tmp = a * (x * -t);
} else {
tmp = j * (t * c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (c <= (-5.5d+26)) then
tmp = z * (b * -c)
else if (c <= 9.2d-143) then
tmp = x * (y * z)
else if (c <= 34000.0d0) then
tmp = a * (x * -t)
else
tmp = j * (t * c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -5.5e+26) {
tmp = z * (b * -c);
} else if (c <= 9.2e-143) {
tmp = x * (y * z);
} else if (c <= 34000.0) {
tmp = a * (x * -t);
} else {
tmp = j * (t * c);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if c <= -5.5e+26: tmp = z * (b * -c) elif c <= 9.2e-143: tmp = x * (y * z) elif c <= 34000.0: tmp = a * (x * -t) else: tmp = j * (t * c) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -5.5e+26) tmp = Float64(z * Float64(b * Float64(-c))); elseif (c <= 9.2e-143) tmp = Float64(x * Float64(y * z)); elseif (c <= 34000.0) tmp = Float64(a * Float64(x * Float64(-t))); else tmp = Float64(j * Float64(t * c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (c <= -5.5e+26) tmp = z * (b * -c); elseif (c <= 9.2e-143) tmp = x * (y * z); elseif (c <= 34000.0) tmp = a * (x * -t); else tmp = j * (t * c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -5.5e+26], N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 9.2e-143], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 34000.0], N[(a * N[(x * (-t)), $MachinePrecision]), $MachinePrecision], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -5.5 \cdot 10^{+26}:\\
\;\;\;\;z \cdot \left(b \cdot \left(-c\right)\right)\\
\mathbf{elif}\;c \leq 9.2 \cdot 10^{-143}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;c \leq 34000:\\
\;\;\;\;a \cdot \left(x \cdot \left(-t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\end{array}
\end{array}
if c < -5.4999999999999997e26Initial program 61.9%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
Applied rewrites60.7%
Taylor expanded in c around inf
Applied rewrites48.9%
if -5.4999999999999997e26 < c < 9.20000000000000045e-143Initial program 81.4%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6454.0
Applied rewrites54.0%
Taylor expanded in y around inf
Applied rewrites33.3%
if 9.20000000000000045e-143 < c < 34000Initial program 80.9%
Taylor expanded in a around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6456.7
Applied rewrites56.7%
Taylor expanded in t around inf
Applied rewrites53.4%
if 34000 < c Initial program 68.9%
Taylor expanded in x around -inf
Applied rewrites74.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites92.6%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6456.2
Applied rewrites56.2%
Taylor expanded in y around 0
Applied rewrites45.5%
Final simplification42.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (fma t (- x) (* b i)))))
(if (<= a -2.2e+93)
t_1
(if (<= a 2.1e+98) (* c (fma b (- z) (* 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 = a * fma(t, -x, (b * i));
double tmp;
if (a <= -2.2e+93) {
tmp = t_1;
} else if (a <= 2.1e+98) {
tmp = c * fma(b, -z, (t * j));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * fma(t, Float64(-x), Float64(b * i))) tmp = 0.0 if (a <= -2.2e+93) tmp = t_1; elseif (a <= 2.1e+98) tmp = Float64(c * fma(b, Float64(-z), Float64(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[(a * N[(t * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.2e+93], t$95$1, If[LessEqual[a, 2.1e+98], N[(c * N[(b * (-z) + N[(t * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \mathsf{fma}\left(t, -x, b \cdot i\right)\\
\mathbf{if}\;a \leq -2.2 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+98}:\\
\;\;\;\;c \cdot \mathsf{fma}\left(b, -z, t \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.20000000000000021e93 or 2.10000000000000004e98 < a Initial program 69.7%
Taylor expanded in a around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6471.2
Applied rewrites71.2%
if -2.20000000000000021e93 < a < 2.10000000000000004e98Initial program 76.1%
Taylor expanded in c around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
+-commutativeN/A
mul-1-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
lower-*.f6451.4
Applied rewrites51.4%
Final simplification58.7%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c -8.5e-121) (* b (fma c (- z) (* a i))) (if (<= c 2.32e+139) (* a (fma t (- x) (* b i))) (* j (* t c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -8.5e-121) {
tmp = b * fma(c, -z, (a * i));
} else if (c <= 2.32e+139) {
tmp = a * fma(t, -x, (b * i));
} else {
tmp = j * (t * c);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -8.5e-121) tmp = Float64(b * fma(c, Float64(-z), Float64(a * i))); elseif (c <= 2.32e+139) tmp = Float64(a * fma(t, Float64(-x), Float64(b * i))); else tmp = Float64(j * Float64(t * c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -8.5e-121], N[(b * N[(c * (-z) + N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.32e+139], N[(a * N[(t * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -8.5 \cdot 10^{-121}:\\
\;\;\;\;b \cdot \mathsf{fma}\left(c, -z, a \cdot i\right)\\
\mathbf{elif}\;c \leq 2.32 \cdot 10^{+139}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(t, -x, b \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\end{array}
\end{array}
if c < -8.50000000000000025e-121Initial program 68.9%
Taylor expanded in b around inf
sub-negN/A
+-commutativeN/A
remove-double-negN/A
distribute-neg-inN/A
sub-negN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
distribute-neg-inN/A
remove-double-negN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6447.0
Applied rewrites47.0%
if -8.50000000000000025e-121 < c < 2.32000000000000008e139Initial program 78.1%
Taylor expanded in a around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6451.9
Applied rewrites51.9%
if 2.32000000000000008e139 < c Initial program 68.7%
Taylor expanded in x around -inf
Applied rewrites80.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites96.2%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6457.0
Applied rewrites57.0%
Taylor expanded in y around 0
Applied rewrites53.1%
Final simplification50.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= c -2.15e+58) (* z (* b (- c))) (if (<= c 2.32e+139) (* a (fma t (- x) (* b i))) (* j (* t c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (c <= -2.15e+58) {
tmp = z * (b * -c);
} else if (c <= 2.32e+139) {
tmp = a * fma(t, -x, (b * i));
} else {
tmp = j * (t * c);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (c <= -2.15e+58) tmp = Float64(z * Float64(b * Float64(-c))); elseif (c <= 2.32e+139) tmp = Float64(a * fma(t, Float64(-x), Float64(b * i))); else tmp = Float64(j * Float64(t * c)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[c, -2.15e+58], N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision], If[LessEqual[c, 2.32e+139], N[(a * N[(t * (-x) + N[(b * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -2.15 \cdot 10^{+58}:\\
\;\;\;\;z \cdot \left(b \cdot \left(-c\right)\right)\\
\mathbf{elif}\;c \leq 2.32 \cdot 10^{+139}:\\
\;\;\;\;a \cdot \mathsf{fma}\left(t, -x, b \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\end{array}
\end{array}
if c < -2.14999999999999996e58Initial program 63.3%
Taylor expanded in t around 0
sub-negN/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
associate-*r*N/A
distribute-rgt-inN/A
lower-fma.f64N/A
associate-*r*N/A
*-commutativeN/A
lower-fma.f64N/A
neg-mul-1N/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f64N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-*.f64N/A
mul-1-negN/A
sub-negN/A
Applied rewrites59.9%
Taylor expanded in c around inf
Applied rewrites50.2%
if -2.14999999999999996e58 < c < 2.32000000000000008e139Initial program 78.1%
Taylor expanded in a around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6447.6
Applied rewrites47.6%
if 2.32000000000000008e139 < c Initial program 68.7%
Taylor expanded in x around -inf
Applied rewrites80.7%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites96.2%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6457.0
Applied rewrites57.0%
Taylor expanded in y around 0
Applied rewrites53.1%
Final simplification48.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= x -250000000.0)
t_1
(if (<= x -1.6e-166)
(* j (* t c))
(if (<= x 2.8e+35) (* i (* a b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (x <= -250000000.0) {
tmp = t_1;
} else if (x <= -1.6e-166) {
tmp = j * (t * c);
} else if (x <= 2.8e+35) {
tmp = i * (a * 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 = x * (y * z)
if (x <= (-250000000.0d0)) then
tmp = t_1
else if (x <= (-1.6d-166)) then
tmp = j * (t * c)
else if (x <= 2.8d+35) then
tmp = i * (a * 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 = x * (y * z);
double tmp;
if (x <= -250000000.0) {
tmp = t_1;
} else if (x <= -1.6e-166) {
tmp = j * (t * c);
} else if (x <= 2.8e+35) {
tmp = i * (a * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if x <= -250000000.0: tmp = t_1 elif x <= -1.6e-166: tmp = j * (t * c) elif x <= 2.8e+35: tmp = i * (a * b) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (x <= -250000000.0) tmp = t_1; elseif (x <= -1.6e-166) tmp = Float64(j * Float64(t * c)); elseif (x <= 2.8e+35) tmp = Float64(i * Float64(a * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * (y * z); tmp = 0.0; if (x <= -250000000.0) tmp = t_1; elseif (x <= -1.6e-166) tmp = j * (t * c); elseif (x <= 2.8e+35) tmp = i * (a * 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[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -250000000.0], t$95$1, If[LessEqual[x, -1.6e-166], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.8e+35], N[(i * N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;x \leq -250000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-166}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{+35}:\\
\;\;\;\;i \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.5e8 or 2.79999999999999999e35 < x Initial program 75.1%
Taylor expanded in x around inf
lower-*.f64N/A
lower--.f64N/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f6475.6
Applied rewrites75.6%
Taylor expanded in y around inf
Applied rewrites45.1%
if -2.5e8 < x < -1.6e-166Initial program 76.2%
Taylor expanded in x around -inf
Applied rewrites74.1%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites65.6%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6453.5
Applied rewrites53.5%
Taylor expanded in y around 0
Applied rewrites34.8%
if -1.6e-166 < x < 2.79999999999999999e35Initial program 71.1%
Taylor expanded in i around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6446.9
Applied rewrites46.9%
Taylor expanded in j around 0
Applied rewrites35.8%
Final simplification40.2%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* a (* b i)))) (if (<= i -3.65e+168) t_1 (if (<= i 7.6e-7) (* 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 = a * (b * i);
double tmp;
if (i <= -3.65e+168) {
tmp = t_1;
} else if (i <= 7.6e-7) {
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 = a * (b * i)
if (i <= (-3.65d+168)) then
tmp = t_1
else if (i <= 7.6d-7) 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 = a * (b * i);
double tmp;
if (i <= -3.65e+168) {
tmp = t_1;
} else if (i <= 7.6e-7) {
tmp = j * (t * c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (b * i) tmp = 0 if i <= -3.65e+168: tmp = t_1 elif i <= 7.6e-7: tmp = j * (t * c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(b * i)) tmp = 0.0 if (i <= -3.65e+168) tmp = t_1; elseif (i <= 7.6e-7) tmp = Float64(j * Float64(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 = a * (b * i); tmp = 0.0; if (i <= -3.65e+168) tmp = t_1; elseif (i <= 7.6e-7) 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[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.65e+168], t$95$1, If[LessEqual[i, 7.6e-7], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot i\right)\\
\mathbf{if}\;i \leq -3.65 \cdot 10^{+168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 7.6 \cdot 10^{-7}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -3.6499999999999998e168 or 7.60000000000000029e-7 < i Initial program 69.7%
Taylor expanded in a around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6454.6
Applied rewrites54.6%
Taylor expanded in t around 0
Applied rewrites38.0%
if -3.6499999999999998e168 < i < 7.60000000000000029e-7Initial program 76.0%
Taylor expanded in x around -inf
Applied rewrites74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites76.7%
Taylor expanded in j around inf
sub-negN/A
mul-1-negN/A
+-commutativeN/A
lower-*.f64N/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
mul-1-negN/A
lower-fma.f64N/A
mul-1-negN/A
lower-neg.f64N/A
*-commutativeN/A
lower-*.f6437.0
Applied rewrites37.0%
Taylor expanded in y around 0
Applied rewrites30.1%
Final simplification32.9%
(FPCore (x y z t a b c i j) :precision binary64 (let* ((t_1 (* a (* b i)))) (if (<= i -3.65e+168) t_1 (if (<= i 7.6e-7) (* 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 = a * (b * i);
double tmp;
if (i <= -3.65e+168) {
tmp = t_1;
} else if (i <= 7.6e-7) {
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 = a * (b * i)
if (i <= (-3.65d+168)) then
tmp = t_1
else if (i <= 7.6d-7) 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 = a * (b * i);
double tmp;
if (i <= -3.65e+168) {
tmp = t_1;
} else if (i <= 7.6e-7) {
tmp = c * (t * j);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * (b * i) tmp = 0 if i <= -3.65e+168: tmp = t_1 elif i <= 7.6e-7: tmp = c * (t * j) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(b * i)) tmp = 0.0 if (i <= -3.65e+168) tmp = t_1; elseif (i <= 7.6e-7) tmp = Float64(c * Float64(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 = a * (b * i); tmp = 0.0; if (i <= -3.65e+168) tmp = t_1; elseif (i <= 7.6e-7) 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[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -3.65e+168], t$95$1, If[LessEqual[i, 7.6e-7], N[(c * N[(t * j), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b \cdot i\right)\\
\mathbf{if}\;i \leq -3.65 \cdot 10^{+168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 7.6 \cdot 10^{-7}:\\
\;\;\;\;c \cdot \left(t \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -3.6499999999999998e168 or 7.60000000000000029e-7 < i Initial program 69.7%
Taylor expanded in a around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6454.6
Applied rewrites54.6%
Taylor expanded in t around 0
Applied rewrites38.0%
if -3.6499999999999998e168 < i < 7.60000000000000029e-7Initial program 76.0%
Taylor expanded in x around -inf
Applied rewrites74.0%
Taylor expanded in c around inf
lower-*.f64N/A
lower--.f64N/A
Applied rewrites76.7%
Taylor expanded in t around inf
Applied rewrites43.9%
Taylor expanded in a around 0
Applied rewrites30.0%
Final simplification32.9%
(FPCore (x y z t a b c i j) :precision binary64 (* a (* b i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (b * 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 = a * (b * 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 a * (b * i);
}
def code(x, y, z, t, a, b, c, i, j): return a * (b * i)
function code(x, y, z, t, a, b, c, i, j) return Float64(a * Float64(b * i)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = a * (b * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(b \cdot i\right)
\end{array}
Initial program 73.7%
Taylor expanded in a around inf
lower-*.f64N/A
sub-negN/A
mul-1-negN/A
distribute-rgt-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
*-commutativeN/A
lower-*.f6440.3
Applied rewrites40.3%
Taylor expanded in t around 0
Applied rewrites20.0%
(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 2024233
(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)))))