
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 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) (* t i)))) (* j (- (* c a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(t * i)))) + Float64(j * Float64(Float64(c * a) - Float64(y * i)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (t * i)))) + (j * ((c * a) - (y * i))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - t \cdot i\right)\right) + j \cdot \left(c \cdot a - y \cdot i\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* t a)))) (t_2 (* j (- (* a c) (* y i)))))
(if (<= (+ (- t_1 (* b (- (* z c) (* t i)))) t_2) INFINITY)
(+ (+ t_1 (- (* b (* t i)) (* b (* z c)))) t_2)
(* j (* a (- c (/ (* x t) j)))))))
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 t_2 = j * ((a * c) - (y * i));
double tmp;
if (((t_1 - (b * ((z * c) - (t * i)))) + t_2) <= ((double) INFINITY)) {
tmp = (t_1 + ((b * (t * i)) - (b * (z * c)))) + t_2;
} else {
tmp = j * (a * (c - ((x * t) / j)));
}
return tmp;
}
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));
double t_2 = j * ((a * c) - (y * i));
double tmp;
if (((t_1 - (b * ((z * c) - (t * i)))) + t_2) <= Double.POSITIVE_INFINITY) {
tmp = (t_1 + ((b * (t * i)) - (b * (z * c)))) + t_2;
} else {
tmp = j * (a * (c - ((x * t) / j)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * ((y * z) - (t * a)) t_2 = j * ((a * c) - (y * i)) tmp = 0 if ((t_1 - (b * ((z * c) - (t * i)))) + t_2) <= math.inf: tmp = (t_1 + ((b * (t * i)) - (b * (z * c)))) + t_2 else: tmp = j * (a * (c - ((x * t) / j))) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(t * a))) t_2 = Float64(j * Float64(Float64(a * c) - Float64(y * i))) tmp = 0.0 if (Float64(Float64(t_1 - Float64(b * Float64(Float64(z * c) - Float64(t * i)))) + t_2) <= Inf) tmp = Float64(Float64(t_1 + Float64(Float64(b * Float64(t * i)) - Float64(b * Float64(z * c)))) + t_2); else tmp = Float64(j * Float64(a * Float64(c - Float64(Float64(x * t) / j)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = x * ((y * z) - (t * a)); t_2 = j * ((a * c) - (y * i)); tmp = 0.0; if (((t_1 - (b * ((z * c) - (t * i)))) + t_2) <= Inf) tmp = (t_1 + ((b * (t * i)) - (b * (z * c)))) + t_2; else tmp = j * (a * (c - ((x * t) / j))); end tmp_2 = 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]}, Block[{t$95$2 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(t$95$1 - N[(b * N[(N[(z * c), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], Infinity], N[(N[(t$95$1 + N[(N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision] - N[(b * N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], N[(j * N[(a * N[(c - N[(N[(x * t), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\
t_2 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;\left(t\_1 - b \cdot \left(z \cdot c - t \cdot i\right)\right) + t\_2 \leq \infty:\\
\;\;\;\;\left(t\_1 + \left(b \cdot \left(t \cdot i\right) - b \cdot \left(z \cdot c\right)\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot \left(c - \frac{x \cdot t}{j}\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.9%
sub-neg91.9%
distribute-rgt-in91.9%
distribute-rgt-neg-in91.9%
Applied egg-rr91.9%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in a around inf 45.0%
+-commutative45.0%
mul-1-neg45.0%
unsub-neg45.0%
Simplified45.0%
Taylor expanded in j around inf 31.0%
+-commutative31.0%
mul-1-neg31.0%
unsub-neg31.0%
*-commutative31.0%
associate-/l*37.9%
associate-/l*37.9%
Simplified37.9%
Taylor expanded in a around 0 47.2%
Final simplification84.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* z c) (* t i))))
(* j (- (* a c) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* j (* a (- c (/ (* x t) j)))))))
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 * ((z * c) - (t * i)))) + (j * ((a * c) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = j * (a * (c - ((x * t) / j)));
}
return tmp;
}
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 * ((z * c) - (t * i)))) + (j * ((a * c) - (y * i)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = j * (a * (c - ((x * t) / j)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((z * c) - (t * i)))) + (j * ((a * c) - (y * i))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = j * (a * (c - ((x * t) / j))) 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(z * c) - Float64(t * i)))) + Float64(j * Float64(Float64(a * c) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(j * Float64(a * Float64(c - Float64(Float64(x * t) / j)))); 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 * ((z * c) - (t * i)))) + (j * ((a * c) - (y * i))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = j * (a * (c - ((x * t) / j))); 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[(z * c), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(j * N[(a * N[(c - N[(N[(x * t), $MachinePrecision] / j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - t \cdot i\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;j \cdot \left(a \cdot \left(c - \frac{x \cdot t}{j}\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) < +inf.0Initial program 91.9%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in a around inf 45.0%
+-commutative45.0%
mul-1-neg45.0%
unsub-neg45.0%
Simplified45.0%
Taylor expanded in j around inf 31.0%
+-commutative31.0%
mul-1-neg31.0%
unsub-neg31.0%
*-commutative31.0%
associate-/l*37.9%
associate-/l*37.9%
Simplified37.9%
Taylor expanded in a around 0 47.2%
Final simplification84.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* t a)))) (t_2 (* j (- (* a c) (* y i)))))
(if (<= j -5.1e+94)
t_2
(if (<= j 2.7e+82) (- (+ t_1 (* b (* t i))) (* b (* z c))) (+ t_1 t_2)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * ((y * z) - (t * a));
double t_2 = j * ((a * c) - (y * i));
double tmp;
if (j <= -5.1e+94) {
tmp = t_2;
} else if (j <= 2.7e+82) {
tmp = (t_1 + (b * (t * i))) - (b * (z * c));
} else {
tmp = t_1 + 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))
t_2 = j * ((a * c) - (y * i))
if (j <= (-5.1d+94)) then
tmp = t_2
else if (j <= 2.7d+82) then
tmp = (t_1 + (b * (t * i))) - (b * (z * c))
else
tmp = t_1 + 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));
double t_2 = j * ((a * c) - (y * i));
double tmp;
if (j <= -5.1e+94) {
tmp = t_2;
} else if (j <= 2.7e+82) {
tmp = (t_1 + (b * (t * i))) - (b * (z * c));
} else {
tmp = t_1 + t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * ((y * z) - (t * a)) t_2 = j * ((a * c) - (y * i)) tmp = 0 if j <= -5.1e+94: tmp = t_2 elif j <= 2.7e+82: tmp = (t_1 + (b * (t * i))) - (b * (z * c)) else: tmp = t_1 + t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(t * a))) t_2 = Float64(j * Float64(Float64(a * c) - Float64(y * i))) tmp = 0.0 if (j <= -5.1e+94) tmp = t_2; elseif (j <= 2.7e+82) tmp = Float64(Float64(t_1 + Float64(b * Float64(t * i))) - Float64(b * Float64(z * c))); else tmp = Float64(t_1 + 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)); t_2 = j * ((a * c) - (y * i)); tmp = 0.0; if (j <= -5.1e+94) tmp = t_2; elseif (j <= 2.7e+82) tmp = (t_1 + (b * (t * i))) - (b * (z * c)); else tmp = t_1 + t_2; end tmp_2 = 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]}, Block[{t$95$2 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.1e+94], t$95$2, If[LessEqual[j, 2.7e+82], N[(N[(t$95$1 + N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\
t_2 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -5.1 \cdot 10^{+94}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq 2.7 \cdot 10^{+82}:\\
\;\;\;\;\left(t\_1 + b \cdot \left(t \cdot i\right)\right) - b \cdot \left(z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + t\_2\\
\end{array}
\end{array}
if j < -5.1000000000000003e94Initial program 78.2%
sub-neg78.2%
distribute-rgt-in78.2%
distribute-rgt-neg-in78.2%
Applied egg-rr78.2%
Taylor expanded in j around inf 78.1%
*-commutative78.1%
Simplified78.1%
if -5.1000000000000003e94 < j < 2.6999999999999999e82Initial program 74.8%
Taylor expanded in j around 0 74.7%
*-commutative74.7%
*-commutative74.7%
Simplified74.7%
Taylor expanded in i around 0 74.7%
if 2.6999999999999999e82 < j Initial program 81.0%
Taylor expanded in b around 0 81.4%
Final simplification76.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* y i)))))
(if (<= j -2.7e+94)
t_1
(if (<= j -1.3e-58)
(* x (- (* y z) (* t a)))
(if (<= j 2.6e-128)
(- (* x (* y z)) (* b (- (* z c) (* t i))))
(if (<= j 8.5e+86) (* t (- (* b i) (* x a))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (y * i));
double tmp;
if (j <= -2.7e+94) {
tmp = t_1;
} else if (j <= -1.3e-58) {
tmp = x * ((y * z) - (t * a));
} else if (j <= 2.6e-128) {
tmp = (x * (y * z)) - (b * ((z * c) - (t * i)));
} else if (j <= 8.5e+86) {
tmp = t * ((b * i) - (x * a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((a * c) - (y * i))
if (j <= (-2.7d+94)) then
tmp = t_1
else if (j <= (-1.3d-58)) then
tmp = x * ((y * z) - (t * a))
else if (j <= 2.6d-128) then
tmp = (x * (y * z)) - (b * ((z * c) - (t * i)))
else if (j <= 8.5d+86) then
tmp = t * ((b * i) - (x * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (y * i));
double tmp;
if (j <= -2.7e+94) {
tmp = t_1;
} else if (j <= -1.3e-58) {
tmp = x * ((y * z) - (t * a));
} else if (j <= 2.6e-128) {
tmp = (x * (y * z)) - (b * ((z * c) - (t * i)));
} else if (j <= 8.5e+86) {
tmp = t * ((b * i) - (x * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (y * i)) tmp = 0 if j <= -2.7e+94: tmp = t_1 elif j <= -1.3e-58: tmp = x * ((y * z) - (t * a)) elif j <= 2.6e-128: tmp = (x * (y * z)) - (b * ((z * c) - (t * i))) elif j <= 8.5e+86: tmp = t * ((b * i) - (x * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(y * i))) tmp = 0.0 if (j <= -2.7e+94) tmp = t_1; elseif (j <= -1.3e-58) tmp = Float64(x * Float64(Float64(y * z) - Float64(t * a))); elseif (j <= 2.6e-128) tmp = Float64(Float64(x * Float64(y * z)) - Float64(b * Float64(Float64(z * c) - Float64(t * i)))); elseif (j <= 8.5e+86) tmp = Float64(t * Float64(Float64(b * i) - Float64(x * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (y * i)); tmp = 0.0; if (j <= -2.7e+94) tmp = t_1; elseif (j <= -1.3e-58) tmp = x * ((y * z) - (t * a)); elseif (j <= 2.6e-128) tmp = (x * (y * z)) - (b * ((z * c) - (t * i))); elseif (j <= 8.5e+86) tmp = t * ((b * i) - (x * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.7e+94], t$95$1, If[LessEqual[j, -1.3e-58], N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.6e-128], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(z * c), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 8.5e+86], N[(t * N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -2.7 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -1.3 \cdot 10^{-58}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\
\mathbf{elif}\;j \leq 2.6 \cdot 10^{-128}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) - b \cdot \left(z \cdot c - t \cdot i\right)\\
\mathbf{elif}\;j \leq 8.5 \cdot 10^{+86}:\\
\;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -2.7000000000000001e94 or 8.5000000000000005e86 < j Initial program 80.2%
sub-neg80.2%
distribute-rgt-in80.2%
distribute-rgt-neg-in80.2%
Applied egg-rr80.2%
Taylor expanded in j around inf 75.8%
*-commutative75.8%
Simplified75.8%
if -2.7000000000000001e94 < j < -1.30000000000000003e-58Initial program 81.6%
sub-neg81.6%
distribute-rgt-in81.6%
distribute-rgt-neg-in81.6%
Applied egg-rr81.6%
Taylor expanded in x around inf 64.2%
*-commutative64.2%
Simplified64.2%
if -1.30000000000000003e-58 < j < 2.59999999999999981e-128Initial program 72.3%
Taylor expanded in j around 0 74.6%
*-commutative74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in a around 0 62.3%
if 2.59999999999999981e-128 < j < 8.5000000000000005e86Initial program 74.8%
Taylor expanded in t around inf 70.6%
distribute-lft-out--70.6%
*-commutative70.6%
Simplified70.6%
Final simplification68.7%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -3.4e+46) (not (<= b 360000000000.0))) (- (* x (* y z)) (* b (* i (- (/ (* z c) i) t)))) (+ (* x (- (* y z) (* t a))) (* j (- (* a c) (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -3.4e+46) || !(b <= 360000000000.0)) {
tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t)));
} else {
tmp = (x * ((y * z) - (t * a))) + (j * ((a * c) - (y * i)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((b <= (-3.4d+46)) .or. (.not. (b <= 360000000000.0d0))) then
tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t)))
else
tmp = (x * ((y * z) - (t * a))) + (j * ((a * c) - (y * i)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -3.4e+46) || !(b <= 360000000000.0)) {
tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t)));
} else {
tmp = (x * ((y * z) - (t * a))) + (j * ((a * c) - (y * i)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (b <= -3.4e+46) or not (b <= 360000000000.0): tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t))) else: tmp = (x * ((y * z) - (t * a))) + (j * ((a * c) - (y * i))) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -3.4e+46) || !(b <= 360000000000.0)) tmp = Float64(Float64(x * Float64(y * z)) - Float64(b * Float64(i * Float64(Float64(Float64(z * c) / i) - t)))); else tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + Float64(j * Float64(Float64(a * c) - Float64(y * i)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((b <= -3.4e+46) || ~((b <= 360000000000.0))) tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t))); else tmp = (x * ((y * z) - (t * a))) + (j * ((a * c) - (y * i))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -3.4e+46], N[Not[LessEqual[b, 360000000000.0]], $MachinePrecision]], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(b * N[(i * N[(N[(N[(z * c), $MachinePrecision] / i), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+46} \lor \neg \left(b \leq 360000000000\right):\\
\;\;\;\;x \cdot \left(y \cdot z\right) - b \cdot \left(i \cdot \left(\frac{z \cdot c}{i} - t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\
\end{array}
\end{array}
if b < -3.3999999999999998e46 or 3.6e11 < b Initial program 76.0%
Taylor expanded in j around 0 73.5%
*-commutative73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in a around 0 72.8%
Taylor expanded in i around inf 72.8%
if -3.3999999999999998e46 < b < 3.6e11Initial program 76.7%
Taylor expanded in b around 0 76.3%
Final simplification74.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (- (* y z) (* t a)))) (t_2 (* j (- (* a c) (* y i)))))
(if (<= j -1.55e+99)
t_2
(if (<= j 1.45e+83) (- t_1 (* b (- (* z c) (* t i)))) (+ 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));
double t_2 = j * ((a * c) - (y * i));
double tmp;
if (j <= -1.55e+99) {
tmp = t_2;
} else if (j <= 1.45e+83) {
tmp = t_1 - (b * ((z * c) - (t * i)));
} else {
tmp = t_1 + 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))
t_2 = j * ((a * c) - (y * i))
if (j <= (-1.55d+99)) then
tmp = t_2
else if (j <= 1.45d+83) then
tmp = t_1 - (b * ((z * c) - (t * i)))
else
tmp = t_1 + 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));
double t_2 = j * ((a * c) - (y * i));
double tmp;
if (j <= -1.55e+99) {
tmp = t_2;
} else if (j <= 1.45e+83) {
tmp = t_1 - (b * ((z * c) - (t * i)));
} else {
tmp = t_1 + t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * ((y * z) - (t * a)) t_2 = j * ((a * c) - (y * i)) tmp = 0 if j <= -1.55e+99: tmp = t_2 elif j <= 1.45e+83: tmp = t_1 - (b * ((z * c) - (t * i))) else: tmp = t_1 + t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(Float64(y * z) - Float64(t * a))) t_2 = Float64(j * Float64(Float64(a * c) - Float64(y * i))) tmp = 0.0 if (j <= -1.55e+99) tmp = t_2; elseif (j <= 1.45e+83) tmp = Float64(t_1 - Float64(b * Float64(Float64(z * c) - Float64(t * i)))); else tmp = Float64(t_1 + 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)); t_2 = j * ((a * c) - (y * i)); tmp = 0.0; if (j <= -1.55e+99) tmp = t_2; elseif (j <= 1.45e+83) tmp = t_1 - (b * ((z * c) - (t * i))); else tmp = t_1 + t_2; end tmp_2 = 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]}, Block[{t$95$2 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1.55e+99], t$95$2, If[LessEqual[j, 1.45e+83], N[(t$95$1 - N[(b * N[(N[(z * c), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right)\\
t_2 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -1.55 \cdot 10^{+99}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq 1.45 \cdot 10^{+83}:\\
\;\;\;\;t\_1 - b \cdot \left(z \cdot c - t \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + t\_2\\
\end{array}
\end{array}
if j < -1.55e99Initial program 78.2%
sub-neg78.2%
distribute-rgt-in78.2%
distribute-rgt-neg-in78.2%
Applied egg-rr78.2%
Taylor expanded in j around inf 78.1%
*-commutative78.1%
Simplified78.1%
if -1.55e99 < j < 1.45e83Initial program 74.8%
Taylor expanded in j around 0 74.7%
*-commutative74.7%
*-commutative74.7%
Simplified74.7%
if 1.45e83 < j Initial program 81.0%
Taylor expanded in b around 0 81.4%
Final simplification76.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* y i)))))
(if (<= j -2.75e+96)
t_1
(if (<= j 1.15e-229)
(- (* x (* y z)) (* b (* i (- (/ (* z c) i) t))))
(if (<= j 8.5e+86) (* t (- (* b i) (* x a))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (y * i));
double tmp;
if (j <= -2.75e+96) {
tmp = t_1;
} else if (j <= 1.15e-229) {
tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t)));
} else if (j <= 8.5e+86) {
tmp = t * ((b * i) - (x * a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((a * c) - (y * i))
if (j <= (-2.75d+96)) then
tmp = t_1
else if (j <= 1.15d-229) then
tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t)))
else if (j <= 8.5d+86) then
tmp = t * ((b * i) - (x * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (y * i));
double tmp;
if (j <= -2.75e+96) {
tmp = t_1;
} else if (j <= 1.15e-229) {
tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t)));
} else if (j <= 8.5e+86) {
tmp = t * ((b * i) - (x * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (y * i)) tmp = 0 if j <= -2.75e+96: tmp = t_1 elif j <= 1.15e-229: tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t))) elif j <= 8.5e+86: tmp = t * ((b * i) - (x * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(y * i))) tmp = 0.0 if (j <= -2.75e+96) tmp = t_1; elseif (j <= 1.15e-229) tmp = Float64(Float64(x * Float64(y * z)) - Float64(b * Float64(i * Float64(Float64(Float64(z * c) / i) - t)))); elseif (j <= 8.5e+86) tmp = Float64(t * Float64(Float64(b * i) - Float64(x * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (y * i)); tmp = 0.0; if (j <= -2.75e+96) tmp = t_1; elseif (j <= 1.15e-229) tmp = (x * (y * z)) - (b * (i * (((z * c) / i) - t))); elseif (j <= 8.5e+86) tmp = t * ((b * i) - (x * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.75e+96], t$95$1, If[LessEqual[j, 1.15e-229], N[(N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision] - N[(b * N[(i * N[(N[(N[(z * c), $MachinePrecision] / i), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 8.5e+86], N[(t * N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -2.75 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 1.15 \cdot 10^{-229}:\\
\;\;\;\;x \cdot \left(y \cdot z\right) - b \cdot \left(i \cdot \left(\frac{z \cdot c}{i} - t\right)\right)\\
\mathbf{elif}\;j \leq 8.5 \cdot 10^{+86}:\\
\;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -2.7500000000000001e96 or 8.5000000000000005e86 < j Initial program 80.2%
sub-neg80.2%
distribute-rgt-in80.2%
distribute-rgt-neg-in80.2%
Applied egg-rr80.2%
Taylor expanded in j around inf 75.8%
*-commutative75.8%
Simplified75.8%
if -2.7500000000000001e96 < j < 1.14999999999999998e-229Initial program 77.2%
Taylor expanded in j around 0 73.5%
*-commutative73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in a around 0 57.0%
Taylor expanded in i around inf 59.9%
if 1.14999999999999998e-229 < j < 8.5000000000000005e86Initial program 70.8%
Taylor expanded in t around inf 68.0%
distribute-lft-out--68.0%
*-commutative68.0%
Simplified68.0%
Final simplification67.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* y i)))))
(if (<= j -4.6e+95)
t_1
(if (<= j 5e-253)
(* x (- (* y z) (* t a)))
(if (<= j 8.2e+86) (* t (- (* b i) (* x a))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (y * i));
double tmp;
if (j <= -4.6e+95) {
tmp = t_1;
} else if (j <= 5e-253) {
tmp = x * ((y * z) - (t * a));
} else if (j <= 8.2e+86) {
tmp = t * ((b * i) - (x * a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((a * c) - (y * i))
if (j <= (-4.6d+95)) then
tmp = t_1
else if (j <= 5d-253) then
tmp = x * ((y * z) - (t * a))
else if (j <= 8.2d+86) then
tmp = t * ((b * i) - (x * a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (y * i));
double tmp;
if (j <= -4.6e+95) {
tmp = t_1;
} else if (j <= 5e-253) {
tmp = x * ((y * z) - (t * a));
} else if (j <= 8.2e+86) {
tmp = t * ((b * i) - (x * a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (y * i)) tmp = 0 if j <= -4.6e+95: tmp = t_1 elif j <= 5e-253: tmp = x * ((y * z) - (t * a)) elif j <= 8.2e+86: tmp = t * ((b * i) - (x * a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(y * i))) tmp = 0.0 if (j <= -4.6e+95) tmp = t_1; elseif (j <= 5e-253) tmp = Float64(x * Float64(Float64(y * z) - Float64(t * a))); elseif (j <= 8.2e+86) tmp = Float64(t * Float64(Float64(b * i) - Float64(x * a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (y * i)); tmp = 0.0; if (j <= -4.6e+95) tmp = t_1; elseif (j <= 5e-253) tmp = x * ((y * z) - (t * a)); elseif (j <= 8.2e+86) tmp = t * ((b * i) - (x * a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -4.6e+95], t$95$1, If[LessEqual[j, 5e-253], N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 8.2e+86], N[(t * N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -4.6 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq 5 \cdot 10^{-253}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\
\mathbf{elif}\;j \leq 8.2 \cdot 10^{+86}:\\
\;\;\;\;t \cdot \left(b \cdot i - x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -4.59999999999999994e95 or 8.1999999999999998e86 < j Initial program 80.2%
sub-neg80.2%
distribute-rgt-in80.2%
distribute-rgt-neg-in80.2%
Applied egg-rr80.2%
Taylor expanded in j around inf 75.8%
*-commutative75.8%
Simplified75.8%
if -4.59999999999999994e95 < j < 4.99999999999999971e-253Initial program 78.3%
sub-neg78.3%
distribute-rgt-in78.3%
distribute-rgt-neg-in78.3%
Applied egg-rr78.3%
Taylor expanded in x around inf 55.1%
*-commutative55.1%
Simplified55.1%
if 4.99999999999999971e-253 < j < 8.1999999999999998e86Initial program 69.8%
Taylor expanded in t around inf 65.8%
distribute-lft-out--65.8%
*-commutative65.8%
Simplified65.8%
Final simplification65.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* y i)))))
(if (<= j -2.95e+94)
t_1
(if (<= j -4.4e-279)
(* x (- (* y z) (* t a)))
(if (<= j 7.5e+82) (* b (- (* t i) (* z c))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (y * i));
double tmp;
if (j <= -2.95e+94) {
tmp = t_1;
} else if (j <= -4.4e-279) {
tmp = x * ((y * z) - (t * a));
} else if (j <= 7.5e+82) {
tmp = b * ((t * i) - (z * c));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((a * c) - (y * i))
if (j <= (-2.95d+94)) then
tmp = t_1
else if (j <= (-4.4d-279)) then
tmp = x * ((y * z) - (t * a))
else if (j <= 7.5d+82) then
tmp = b * ((t * i) - (z * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((a * c) - (y * i));
double tmp;
if (j <= -2.95e+94) {
tmp = t_1;
} else if (j <= -4.4e-279) {
tmp = x * ((y * z) - (t * a));
} else if (j <= 7.5e+82) {
tmp = b * ((t * i) - (z * c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((a * c) - (y * i)) tmp = 0 if j <= -2.95e+94: tmp = t_1 elif j <= -4.4e-279: tmp = x * ((y * z) - (t * a)) elif j <= 7.5e+82: tmp = b * ((t * i) - (z * c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(a * c) - Float64(y * i))) tmp = 0.0 if (j <= -2.95e+94) tmp = t_1; elseif (j <= -4.4e-279) tmp = Float64(x * Float64(Float64(y * z) - Float64(t * a))); elseif (j <= 7.5e+82) tmp = Float64(b * Float64(Float64(t * i) - Float64(z * c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((a * c) - (y * i)); tmp = 0.0; if (j <= -2.95e+94) tmp = t_1; elseif (j <= -4.4e-279) tmp = x * ((y * z) - (t * a)); elseif (j <= 7.5e+82) tmp = b * ((t * i) - (z * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -2.95e+94], t$95$1, If[LessEqual[j, -4.4e-279], N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 7.5e+82], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -2.95 \cdot 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -4.4 \cdot 10^{-279}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right)\\
\mathbf{elif}\;j \leq 7.5 \cdot 10^{+82}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if j < -2.94999999999999995e94 or 7.4999999999999999e82 < j Initial program 79.5%
sub-neg79.5%
distribute-rgt-in79.5%
distribute-rgt-neg-in79.5%
Applied egg-rr79.5%
Taylor expanded in j around inf 75.2%
*-commutative75.2%
Simplified75.2%
if -2.94999999999999995e94 < j < -4.40000000000000001e-279Initial program 77.0%
sub-neg77.0%
distribute-rgt-in77.0%
distribute-rgt-neg-in77.0%
Applied egg-rr77.0%
Taylor expanded in x around inf 56.8%
*-commutative56.8%
Simplified56.8%
if -4.40000000000000001e-279 < j < 7.4999999999999999e82Initial program 72.8%
Taylor expanded in b around inf 58.7%
Final simplification63.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -3.6e+112)
(* j (* a c))
(if (<= j -2e-276)
(* x (* y z))
(if (<= j 2.05e+87) (* t (* b i)) (* a (* c j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -3.6e+112) {
tmp = j * (a * c);
} else if (j <= -2e-276) {
tmp = x * (y * z);
} else if (j <= 2.05e+87) {
tmp = t * (b * i);
} else {
tmp = a * (c * j);
}
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 (j <= (-3.6d+112)) then
tmp = j * (a * c)
else if (j <= (-2d-276)) then
tmp = x * (y * z)
else if (j <= 2.05d+87) then
tmp = t * (b * i)
else
tmp = a * (c * j)
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 (j <= -3.6e+112) {
tmp = j * (a * c);
} else if (j <= -2e-276) {
tmp = x * (y * z);
} else if (j <= 2.05e+87) {
tmp = t * (b * i);
} else {
tmp = a * (c * j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -3.6e+112: tmp = j * (a * c) elif j <= -2e-276: tmp = x * (y * z) elif j <= 2.05e+87: tmp = t * (b * i) else: tmp = a * (c * j) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -3.6e+112) tmp = Float64(j * Float64(a * c)); elseif (j <= -2e-276) tmp = Float64(x * Float64(y * z)); elseif (j <= 2.05e+87) tmp = Float64(t * Float64(b * i)); else tmp = Float64(a * Float64(c * j)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (j <= -3.6e+112) tmp = j * (a * c); elseif (j <= -2e-276) tmp = x * (y * z); elseif (j <= 2.05e+87) tmp = t * (b * i); else tmp = a * (c * j); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -3.6e+112], N[(j * N[(a * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -2e-276], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.05e+87], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -3.6 \cdot 10^{+112}:\\
\;\;\;\;j \cdot \left(a \cdot c\right)\\
\mathbf{elif}\;j \leq -2 \cdot 10^{-276}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;j \leq 2.05 \cdot 10^{+87}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\end{array}
\end{array}
if j < -3.6e112Initial program 79.0%
sub-neg79.0%
distribute-rgt-in79.0%
distribute-rgt-neg-in79.0%
Applied egg-rr79.0%
Taylor expanded in j around inf 77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in c around inf 52.1%
*-commutative52.1%
*-commutative52.1%
associate-*r*52.1%
Simplified52.1%
if -3.6e112 < j < -2e-276Initial program 77.2%
Taylor expanded in z around inf 39.7%
Taylor expanded in x around inf 33.5%
*-commutative33.5%
Simplified33.5%
if -2e-276 < j < 2.05e87Initial program 72.1%
Taylor expanded in j around 0 73.9%
*-commutative73.9%
*-commutative73.9%
Simplified73.9%
Taylor expanded in i around 0 73.9%
Taylor expanded in i around inf 36.3%
*-commutative36.3%
associate-*r*33.2%
*-commutative33.2%
associate-*r*37.4%
Simplified37.4%
if 2.05e87 < j Initial program 82.1%
Taylor expanded in a around inf 57.5%
+-commutative57.5%
mul-1-neg57.5%
unsub-neg57.5%
Simplified57.5%
Taylor expanded in c around inf 44.8%
Final simplification39.7%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -1e+47) (not (<= b 200000000000.0))) (* b (- (* t i) (* z c))) (* a (- (* c j) (* x t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -1e+47) || !(b <= 200000000000.0)) {
tmp = b * ((t * i) - (z * c));
} else {
tmp = a * ((c * j) - (x * t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((b <= (-1d+47)) .or. (.not. (b <= 200000000000.0d0))) then
tmp = b * ((t * i) - (z * c))
else
tmp = a * ((c * j) - (x * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((b <= -1e+47) || !(b <= 200000000000.0)) {
tmp = b * ((t * i) - (z * c));
} else {
tmp = a * ((c * j) - (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (b <= -1e+47) or not (b <= 200000000000.0): tmp = b * ((t * i) - (z * c)) else: tmp = a * ((c * j) - (x * t)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((b <= -1e+47) || !(b <= 200000000000.0)) tmp = Float64(b * Float64(Float64(t * i) - Float64(z * c))); else tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((b <= -1e+47) || ~((b <= 200000000000.0))) tmp = b * ((t * i) - (z * c)); else tmp = a * ((c * j) - (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[b, -1e+47], N[Not[LessEqual[b, 200000000000.0]], $MachinePrecision]], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+47} \lor \neg \left(b \leq 200000000000\right):\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\
\end{array}
\end{array}
if b < -1e47 or 2e11 < b Initial program 76.0%
Taylor expanded in b around inf 66.3%
if -1e47 < b < 2e11Initial program 76.7%
Taylor expanded in a around inf 52.6%
+-commutative52.6%
mul-1-neg52.6%
unsub-neg52.6%
Simplified52.6%
Final simplification58.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= i -1.55e+205) (* b (* t i)) (if (<= i 1.9e+217) (* a (- (* c j) (* x t))) (* t (* b i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.55e+205) {
tmp = b * (t * i);
} else if (i <= 1.9e+217) {
tmp = a * ((c * j) - (x * t));
} else {
tmp = t * (b * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (i <= (-1.55d+205)) then
tmp = b * (t * i)
else if (i <= 1.9d+217) then
tmp = a * ((c * j) - (x * t))
else
tmp = t * (b * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.55e+205) {
tmp = b * (t * i);
} else if (i <= 1.9e+217) {
tmp = a * ((c * j) - (x * t));
} else {
tmp = t * (b * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -1.55e+205: tmp = b * (t * i) elif i <= 1.9e+217: tmp = a * ((c * j) - (x * t)) else: tmp = t * (b * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -1.55e+205) tmp = Float64(b * Float64(t * i)); elseif (i <= 1.9e+217) tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t))); else tmp = Float64(t * Float64(b * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -1.55e+205) tmp = b * (t * i); elseif (i <= 1.9e+217) tmp = a * ((c * j) - (x * t)); else tmp = t * (b * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -1.55e+205], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.9e+217], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.55 \cdot 10^{+205}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\mathbf{elif}\;i \leq 1.9 \cdot 10^{+217}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\end{array}
\end{array}
if i < -1.55000000000000009e205Initial program 66.8%
Taylor expanded in j around 0 56.1%
*-commutative56.1%
*-commutative56.1%
Simplified56.1%
Taylor expanded in i around inf 59.6%
if -1.55000000000000009e205 < i < 1.90000000000000001e217Initial program 77.9%
Taylor expanded in a around inf 45.8%
+-commutative45.8%
mul-1-neg45.8%
unsub-neg45.8%
Simplified45.8%
if 1.90000000000000001e217 < i Initial program 69.1%
Taylor expanded in j around 0 59.2%
*-commutative59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in i around 0 59.2%
Taylor expanded in i around inf 54.7%
*-commutative54.7%
associate-*r*59.3%
*-commutative59.3%
associate-*r*69.3%
Simplified69.3%
Final simplification48.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= j -9.5e-59) (not (<= j 3.5e+87))) (* a (* c j)) (* t (* b i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((j <= -9.5e-59) || !(j <= 3.5e+87)) {
tmp = a * (c * j);
} else {
tmp = t * (b * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((j <= (-9.5d-59)) .or. (.not. (j <= 3.5d+87))) then
tmp = a * (c * j)
else
tmp = t * (b * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((j <= -9.5e-59) || !(j <= 3.5e+87)) {
tmp = a * (c * j);
} else {
tmp = t * (b * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (j <= -9.5e-59) or not (j <= 3.5e+87): tmp = a * (c * j) else: tmp = t * (b * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((j <= -9.5e-59) || !(j <= 3.5e+87)) tmp = Float64(a * Float64(c * j)); else tmp = Float64(t * Float64(b * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((j <= -9.5e-59) || ~((j <= 3.5e+87))) tmp = a * (c * j); else tmp = t * (b * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[j, -9.5e-59], N[Not[LessEqual[j, 3.5e+87]], $MachinePrecision]], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -9.5 \cdot 10^{-59} \lor \neg \left(j \leq 3.5 \cdot 10^{+87}\right):\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\end{array}
\end{array}
if j < -9.4999999999999994e-59 or 3.49999999999999986e87 < j Initial program 80.3%
Taylor expanded in a around inf 50.3%
+-commutative50.3%
mul-1-neg50.3%
unsub-neg50.3%
Simplified50.3%
Taylor expanded in c around inf 38.8%
if -9.4999999999999994e-59 < j < 3.49999999999999986e87Initial program 73.4%
Taylor expanded in j around 0 73.8%
*-commutative73.8%
*-commutative73.8%
Simplified73.8%
Taylor expanded in i around 0 73.8%
Taylor expanded in i around inf 31.3%
*-commutative31.3%
associate-*r*30.7%
*-commutative30.7%
associate-*r*32.6%
Simplified32.6%
Final simplification35.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= j -2.5e-37) (not (<= j 3.4e+87))) (* a (* c j)) (* b (* t i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((j <= -2.5e-37) || !(j <= 3.4e+87)) {
tmp = a * (c * j);
} else {
tmp = b * (t * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((j <= (-2.5d-37)) .or. (.not. (j <= 3.4d+87))) then
tmp = a * (c * j)
else
tmp = b * (t * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((j <= -2.5e-37) || !(j <= 3.4e+87)) {
tmp = a * (c * j);
} else {
tmp = b * (t * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (j <= -2.5e-37) or not (j <= 3.4e+87): tmp = a * (c * j) else: tmp = b * (t * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((j <= -2.5e-37) || !(j <= 3.4e+87)) tmp = Float64(a * Float64(c * j)); else tmp = Float64(b * Float64(t * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((j <= -2.5e-37) || ~((j <= 3.4e+87))) tmp = a * (c * j); else tmp = b * (t * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[j, -2.5e-37], N[Not[LessEqual[j, 3.4e+87]], $MachinePrecision]], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -2.5 \cdot 10^{-37} \lor \neg \left(j \leq 3.4 \cdot 10^{+87}\right):\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\end{array}
\end{array}
if j < -2.4999999999999999e-37 or 3.4000000000000002e87 < j Initial program 79.1%
Taylor expanded in a around inf 50.7%
+-commutative50.7%
mul-1-neg50.7%
unsub-neg50.7%
Simplified50.7%
Taylor expanded in c around inf 40.3%
if -2.4999999999999999e-37 < j < 3.4000000000000002e87Initial program 74.6%
Taylor expanded in j around 0 72.5%
*-commutative72.5%
*-commutative72.5%
Simplified72.5%
Taylor expanded in i around inf 30.6%
Final simplification34.6%
(FPCore (x y z t a b c i j) :precision binary64 (* a (* c j)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (c * j);
}
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 * (c * j)
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 * (c * j);
}
def code(x, y, z, t, a, b, c, i, j): return a * (c * j)
function code(x, y, z, t, a, b, c, i, j) return Float64(a * Float64(c * j)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = a * (c * j); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(c \cdot j\right)
\end{array}
Initial program 76.4%
Taylor expanded in a around inf 41.8%
+-commutative41.8%
mul-1-neg41.8%
unsub-neg41.8%
Simplified41.8%
Taylor expanded in c around inf 22.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* c a) (* y i))))
(t_2
(+
(-
(* x (- (* y z) (* t a)))
(/
(* b (- (pow (* c z) 2.0) (pow (* t i) 2.0)))
(+ (* c z) (* t i))))
t_1)))
(if (< x -1.469694296777705e-64)
t_2
(if (< x 3.2113527362226803e-147)
(- (* (- (* b i) (* x a)) t) (- (* z (* c b)) t_1))
t_2))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (pow((c * z), 2.0) - pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = j * ((c * a) - (y * i))
t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ** 2.0d0) - ((t * i) ** 2.0d0))) / ((c * z) + (t * i)))) + t_1
if (x < (-1.469694296777705d-64)) then
tmp = t_2
else if (x < 3.2113527362226803d-147) then
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((c * a) - (y * i));
double t_2 = ((x * ((y * z) - (t * a))) - ((b * (Math.pow((c * z), 2.0) - Math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1;
double tmp;
if (x < -1.469694296777705e-64) {
tmp = t_2;
} else if (x < 3.2113527362226803e-147) {
tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((c * a) - (y * i)) t_2 = ((x * ((y * z) - (t * a))) - ((b * (math.pow((c * z), 2.0) - math.pow((t * i), 2.0))) / ((c * z) + (t * i)))) + t_1 tmp = 0 if x < -1.469694296777705e-64: tmp = t_2 elif x < 3.2113527362226803e-147: tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(c * a) - Float64(y * i))) t_2 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(Float64(b * Float64((Float64(c * z) ^ 2.0) - (Float64(t * i) ^ 2.0))) / Float64(Float64(c * z) + Float64(t * i)))) + t_1) tmp = 0.0 if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = Float64(Float64(Float64(Float64(b * i) - Float64(x * a)) * t) - Float64(Float64(z * Float64(c * b)) - t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((c * a) - (y * i)); t_2 = ((x * ((y * z) - (t * a))) - ((b * (((c * z) ^ 2.0) - ((t * i) ^ 2.0))) / ((c * z) + (t * i)))) + t_1; tmp = 0.0; if (x < -1.469694296777705e-64) tmp = t_2; elseif (x < 3.2113527362226803e-147) tmp = (((b * i) - (x * a)) * t) - ((z * (c * b)) - t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(c * a), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[Power[N[(c * z), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(t * i), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * z), $MachinePrecision] + N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[Less[x, -1.469694296777705e-64], t$95$2, If[Less[x, 3.2113527362226803e-147], N[(N[(N[(N[(b * i), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] - N[(N[(z * N[(c * b), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(c \cdot a - y \cdot i\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - \frac{b \cdot \left({\left(c \cdot z\right)}^{2} - {\left(t \cdot i\right)}^{2}\right)}{c \cdot z + t \cdot i}\right) + t\_1\\
\mathbf{if}\;x < -1.469694296777705 \cdot 10^{-64}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x < 3.2113527362226803 \cdot 10^{-147}:\\
\;\;\;\;\left(b \cdot i - x \cdot a\right) \cdot t - \left(z \cdot \left(c \cdot b\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024137
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:alt
(! :herbie-platform default (if (< x -293938859355541/2000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 32113527362226803/10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2) (pow (* t i) 2))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))