
(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 17 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))) (* b (- (* t i) (* z c)))))
(t_2 (- (* a c) (* y i))))
(if (<= (+ t_1 (* j t_2)) INFINITY)
(fma j t_2 t_1)
(* b (* c (- (/ (* t i) c) z))))))
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 * ((t * i) - (z * c)));
double t_2 = (a * c) - (y * i);
double tmp;
if ((t_1 + (j * t_2)) <= ((double) INFINITY)) {
tmp = fma(j, t_2, t_1);
} else {
tmp = b * (c * (((t * i) / c) - z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + Float64(b * Float64(Float64(t * i) - Float64(z * c)))) t_2 = Float64(Float64(a * c) - Float64(y * i)) tmp = 0.0 if (Float64(t_1 + Float64(j * t_2)) <= Inf) tmp = fma(j, t_2, t_1); else tmp = Float64(b * Float64(c * Float64(Float64(Float64(t * i) / c) - z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$1 + N[(j * t$95$2), $MachinePrecision]), $MachinePrecision], Infinity], N[(j * t$95$2 + t$95$1), $MachinePrecision], N[(b * N[(c * N[(N[(N[(t * i), $MachinePrecision] / c), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z - t \cdot a\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\
t_2 := a \cdot c - y \cdot i\\
\mathbf{if}\;t\_1 + j \cdot t\_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(j, t\_2, t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c \cdot \left(\frac{t \cdot i}{c} - z\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 92.3%
+-commutative92.3%
fma-define92.3%
*-commutative92.3%
*-commutative92.3%
Simplified92.3%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in b around inf 48.4%
Taylor expanded in c around inf 50.4%
Final simplification83.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(+ (* x (- (* y z) (* t a))) (* b (- (* t i) (* z c))))
(* j (- (* a c) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* b (* c (- (/ (* t i) c) z))))))
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 * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = b * (c * (((t * i) / c) - z));
}
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 * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = b * (c * (((t * i) / c) - z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) + (b * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = b * (c * (((t * i) / c) - z)) 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(t * i) - Float64(z * c)))) + Float64(j * Float64(Float64(a * c) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(b * Float64(c * Float64(Float64(Float64(t * i) / c) - z))); 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 * ((t * i) - (z * c)))) + (j * ((a * c) - (y * i))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = b * (c * (((t * i) / c) - z)); 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[(t * i), $MachinePrecision] - N[(z * c), $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[(b * N[(c * N[(N[(N[(t * i), $MachinePrecision] / c), $MachinePrecision] - z), $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(t \cdot i - z \cdot c\right)\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(c \cdot \left(\frac{t \cdot i}{c} - z\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 92.3%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 t i)))) (*.f64 j (-.f64 (*.f64 c a) (*.f64 y i)))) Initial program 0.0%
Taylor expanded in b around inf 48.4%
Taylor expanded in c around inf 50.4%
Final simplification83.8%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= i -1.7e+183)
(* (* x i) (- (* b (/ t x)) (* j (/ y x))))
(if (<= i 4.3e+126)
(+
(+ (* a (- (* c j) (* x t))) (* y (- (* x z) (* i j))))
(* b (- (* t i) (* z c))))
(* i (- (* t b) (* y j))))))
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.7e+183) {
tmp = (x * i) * ((b * (t / x)) - (j * (y / x)));
} else if (i <= 4.3e+126) {
tmp = ((a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j)))) + (b * ((t * i) - (z * c)));
} else {
tmp = i * ((t * b) - (y * 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 (i <= (-1.7d+183)) then
tmp = (x * i) * ((b * (t / x)) - (j * (y / x)))
else if (i <= 4.3d+126) then
tmp = ((a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j)))) + (b * ((t * i) - (z * c)))
else
tmp = i * ((t * b) - (y * 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 (i <= -1.7e+183) {
tmp = (x * i) * ((b * (t / x)) - (j * (y / x)));
} else if (i <= 4.3e+126) {
tmp = ((a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j)))) + (b * ((t * i) - (z * c)));
} else {
tmp = i * ((t * b) - (y * j));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -1.7e+183: tmp = (x * i) * ((b * (t / x)) - (j * (y / x))) elif i <= 4.3e+126: tmp = ((a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j)))) + (b * ((t * i) - (z * c))) else: tmp = i * ((t * b) - (y * j)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -1.7e+183) tmp = Float64(Float64(x * i) * Float64(Float64(b * Float64(t / x)) - Float64(j * Float64(y / x)))); elseif (i <= 4.3e+126) tmp = Float64(Float64(Float64(a * Float64(Float64(c * j) - Float64(x * t))) + Float64(y * Float64(Float64(x * z) - Float64(i * j)))) + Float64(b * Float64(Float64(t * i) - Float64(z * c)))); else tmp = Float64(i * Float64(Float64(t * b) - Float64(y * j))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -1.7e+183) tmp = (x * i) * ((b * (t / x)) - (j * (y / x))); elseif (i <= 4.3e+126) tmp = ((a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j)))) + (b * ((t * i) - (z * c))); else tmp = i * ((t * b) - (y * j)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -1.7e+183], N[(N[(x * i), $MachinePrecision] * N[(N[(b * N[(t / x), $MachinePrecision]), $MachinePrecision] - N[(j * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4.3e+126], N[(N[(N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(N[(t * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.7 \cdot 10^{+183}:\\
\;\;\;\;\left(x \cdot i\right) \cdot \left(b \cdot \frac{t}{x} - j \cdot \frac{y}{x}\right)\\
\mathbf{elif}\;i \leq 4.3 \cdot 10^{+126}:\\
\;\;\;\;\left(a \cdot \left(c \cdot j - x \cdot t\right) + y \cdot \left(x \cdot z - i \cdot j\right)\right) + b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(t \cdot b - y \cdot j\right)\\
\end{array}
\end{array}
if i < -1.7e183Initial program 48.4%
Taylor expanded in x around inf 57.1%
fma-define61.4%
associate-/l*61.4%
fma-define65.7%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in i around inf 82.7%
associate-*r*82.9%
distribute-lft-out--82.9%
associate-/l*82.8%
associate-/l*83.2%
Simplified83.2%
if -1.7e183 < i < 4.3000000000000002e126Initial program 79.2%
Taylor expanded in y around 0 80.3%
Simplified81.8%
if 4.3000000000000002e126 < i Initial program 58.6%
Taylor expanded in y around 0 58.4%
Simplified58.4%
Taylor expanded in i around inf 81.5%
+-commutative81.5%
mul-1-neg81.5%
unsub-neg81.5%
*-commutative81.5%
Simplified81.5%
Final simplification81.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= b -3.5e+82)
(* b (* c (- (/ (* t i) c) z)))
(if (<= b 1.22e-291)
(+ (* a (- (* c j) (* x t))) t_1)
(if (<= b 6e+144)
(+ (* j (- (* a c) (* y i))) t_1)
(* b (- (* t i) (* z c))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (b <= -3.5e+82) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 1.22e-291) {
tmp = (a * ((c * j) - (x * t))) + t_1;
} else if (b <= 6e+144) {
tmp = (j * ((a * c) - (y * i))) + t_1;
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (b <= (-3.5d+82)) then
tmp = b * (c * (((t * i) / c) - z))
else if (b <= 1.22d-291) then
tmp = (a * ((c * j) - (x * t))) + t_1
else if (b <= 6d+144) then
tmp = (j * ((a * c) - (y * i))) + t_1
else
tmp = b * ((t * i) - (z * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = x * (y * z);
double tmp;
if (b <= -3.5e+82) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 1.22e-291) {
tmp = (a * ((c * j) - (x * t))) + t_1;
} else if (b <= 6e+144) {
tmp = (j * ((a * c) - (y * i))) + t_1;
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if b <= -3.5e+82: tmp = b * (c * (((t * i) / c) - z)) elif b <= 1.22e-291: tmp = (a * ((c * j) - (x * t))) + t_1 elif b <= 6e+144: tmp = (j * ((a * c) - (y * i))) + t_1 else: tmp = b * ((t * i) - (z * c)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (b <= -3.5e+82) tmp = Float64(b * Float64(c * Float64(Float64(Float64(t * i) / c) - z))); elseif (b <= 1.22e-291) tmp = Float64(Float64(a * Float64(Float64(c * j) - Float64(x * t))) + t_1); elseif (b <= 6e+144) tmp = Float64(Float64(j * Float64(Float64(a * c) - Float64(y * i))) + t_1); else tmp = Float64(b * Float64(Float64(t * i) - Float64(z * c))); 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 (b <= -3.5e+82) tmp = b * (c * (((t * i) / c) - z)); elseif (b <= 1.22e-291) tmp = (a * ((c * j) - (x * t))) + t_1; elseif (b <= 6e+144) tmp = (j * ((a * c) - (y * i))) + t_1; else tmp = b * ((t * i) - (z * c)); 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[b, -3.5e+82], N[(b * N[(c * N[(N[(N[(t * i), $MachinePrecision] / c), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.22e-291], N[(N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 6e+144], N[(N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;b \leq -3.5 \cdot 10^{+82}:\\
\;\;\;\;b \cdot \left(c \cdot \left(\frac{t \cdot i}{c} - z\right)\right)\\
\mathbf{elif}\;b \leq 1.22 \cdot 10^{-291}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + t\_1\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+144}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\end{array}
\end{array}
if b < -3.5e82Initial program 82.6%
Taylor expanded in b around inf 74.4%
Taylor expanded in c around inf 76.0%
if -3.5e82 < b < 1.21999999999999993e-291Initial program 73.9%
Taylor expanded in y around 0 74.9%
Simplified76.1%
Taylor expanded in b around 0 69.7%
Taylor expanded in x around inf 63.7%
if 1.21999999999999993e-291 < b < 5.9999999999999998e144Initial program 72.1%
Taylor expanded in y around inf 66.4%
if 5.9999999999999998e144 < b Initial program 59.4%
Taylor expanded in b around inf 76.9%
Final simplification69.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* t i) (* z c)))))
(if (<= b -2e-77)
t_1
(if (<= b -4.2e-227)
(* y (- (* x z) (* i j)))
(if (<= b 1.62e-298)
(* a (- (* c j) (* x t)))
(if (<= b 6.8e+144) (* j (- (* a c) (* y 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 = b * ((t * i) - (z * c));
double tmp;
if (b <= -2e-77) {
tmp = t_1;
} else if (b <= -4.2e-227) {
tmp = y * ((x * z) - (i * j));
} else if (b <= 1.62e-298) {
tmp = a * ((c * j) - (x * t));
} else if (b <= 6.8e+144) {
tmp = j * ((a * c) - (y * i));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * ((t * i) - (z * c))
if (b <= (-2d-77)) then
tmp = t_1
else if (b <= (-4.2d-227)) then
tmp = y * ((x * z) - (i * j))
else if (b <= 1.62d-298) then
tmp = a * ((c * j) - (x * t))
else if (b <= 6.8d+144) then
tmp = j * ((a * c) - (y * i))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((t * i) - (z * c));
double tmp;
if (b <= -2e-77) {
tmp = t_1;
} else if (b <= -4.2e-227) {
tmp = y * ((x * z) - (i * j));
} else if (b <= 1.62e-298) {
tmp = a * ((c * j) - (x * t));
} else if (b <= 6.8e+144) {
tmp = j * ((a * c) - (y * i));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((t * i) - (z * c)) tmp = 0 if b <= -2e-77: tmp = t_1 elif b <= -4.2e-227: tmp = y * ((x * z) - (i * j)) elif b <= 1.62e-298: tmp = a * ((c * j) - (x * t)) elif b <= 6.8e+144: tmp = j * ((a * c) - (y * i)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(t * i) - Float64(z * c))) tmp = 0.0 if (b <= -2e-77) tmp = t_1; elseif (b <= -4.2e-227) tmp = Float64(y * Float64(Float64(x * z) - Float64(i * j))); elseif (b <= 1.62e-298) tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t))); elseif (b <= 6.8e+144) tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((t * i) - (z * c)); tmp = 0.0; if (b <= -2e-77) tmp = t_1; elseif (b <= -4.2e-227) tmp = y * ((x * z) - (i * j)); elseif (b <= 1.62e-298) tmp = a * ((c * j) - (x * t)); elseif (b <= 6.8e+144) tmp = j * ((a * c) - (y * i)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2e-77], t$95$1, If[LessEqual[b, -4.2e-227], N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.62e-298], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.8e+144], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{if}\;b \leq -2 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -4.2 \cdot 10^{-227}:\\
\;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\
\mathbf{elif}\;b \leq 1.62 \cdot 10^{-298}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{elif}\;b \leq 6.8 \cdot 10^{+144}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -1.9999999999999999e-77 or 6.7999999999999998e144 < b Initial program 73.5%
Taylor expanded in b around inf 67.3%
if -1.9999999999999999e-77 < b < -4.1999999999999999e-227Initial program 67.8%
Taylor expanded in y around inf 62.1%
+-commutative62.1%
mul-1-neg62.1%
unsub-neg62.1%
*-commutative62.1%
*-commutative62.1%
Simplified62.1%
if -4.1999999999999999e-227 < b < 1.6199999999999999e-298Initial program 87.0%
Taylor expanded in a around inf 74.7%
+-commutative74.7%
mul-1-neg74.7%
unsub-neg74.7%
*-commutative74.7%
Simplified74.7%
if 1.6199999999999999e-298 < b < 6.7999999999999998e144Initial program 72.1%
Taylor expanded in y around 0 73.4%
Simplified73.4%
Taylor expanded in j around inf 55.7%
+-commutative55.7%
mul-1-neg55.7%
sub-neg55.7%
*-commutative55.7%
Simplified55.7%
Final simplification63.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (- (* c j) (* x t)))))
(if (or (<= b -9.6e-53) (not (<= b 3e+19)))
(+ t_1 (* b (- (* t i) (* z c))))
(+ t_1 (* y (- (* x z) (* i j)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * ((c * j) - (x * t));
double tmp;
if ((b <= -9.6e-53) || !(b <= 3e+19)) {
tmp = t_1 + (b * ((t * i) - (z * c)));
} else {
tmp = t_1 + (y * ((x * z) - (i * 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) :: t_1
real(8) :: tmp
t_1 = a * ((c * j) - (x * t))
if ((b <= (-9.6d-53)) .or. (.not. (b <= 3d+19))) then
tmp = t_1 + (b * ((t * i) - (z * c)))
else
tmp = t_1 + (y * ((x * z) - (i * 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 t_1 = a * ((c * j) - (x * t));
double tmp;
if ((b <= -9.6e-53) || !(b <= 3e+19)) {
tmp = t_1 + (b * ((t * i) - (z * c)));
} else {
tmp = t_1 + (y * ((x * z) - (i * j)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * ((c * j) - (x * t)) tmp = 0 if (b <= -9.6e-53) or not (b <= 3e+19): tmp = t_1 + (b * ((t * i) - (z * c))) else: tmp = t_1 + (y * ((x * z) - (i * j))) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(Float64(c * j) - Float64(x * t))) tmp = 0.0 if ((b <= -9.6e-53) || !(b <= 3e+19)) tmp = Float64(t_1 + Float64(b * Float64(Float64(t * i) - Float64(z * c)))); else tmp = Float64(t_1 + Float64(y * Float64(Float64(x * z) - Float64(i * j)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * ((c * j) - (x * t)); tmp = 0.0; if ((b <= -9.6e-53) || ~((b <= 3e+19))) tmp = t_1 + (b * ((t * i) - (z * c))); else tmp = t_1 + (y * ((x * z) - (i * j))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -9.6e-53], N[Not[LessEqual[b, 3e+19]], $MachinePrecision]], N[(t$95$1 + N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{if}\;b \leq -9.6 \cdot 10^{-53} \lor \neg \left(b \leq 3 \cdot 10^{+19}\right):\\
\;\;\;\;t\_1 + b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + y \cdot \left(x \cdot z - i \cdot j\right)\\
\end{array}
\end{array}
if b < -9.6000000000000003e-53 or 3e19 < b Initial program 73.7%
Taylor expanded in y around 0 71.8%
mul-1-neg71.8%
distribute-rgt-neg-in71.8%
mul-1-neg71.8%
distribute-lft-in73.2%
+-commutative73.2%
mul-1-neg73.2%
unsub-neg73.2%
*-commutative73.2%
Simplified73.2%
if -9.6000000000000003e-53 < b < 3e19Initial program 73.4%
Taylor expanded in y around 0 71.7%
Simplified72.6%
Taylor expanded in b around 0 77.8%
Final simplification75.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (- (* c j) (* x t)))) (t_2 (* b (- (* t i) (* z c)))))
(if (<= b -1.35e-105)
(+ (* x (- (* y z) (* t a))) t_2)
(if (<= b 2.5e+19) (+ t_1 (* y (- (* x z) (* i j)))) (+ 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 = a * ((c * j) - (x * t));
double t_2 = b * ((t * i) - (z * c));
double tmp;
if (b <= -1.35e-105) {
tmp = (x * ((y * z) - (t * a))) + t_2;
} else if (b <= 2.5e+19) {
tmp = t_1 + (y * ((x * z) - (i * j)));
} 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 = a * ((c * j) - (x * t))
t_2 = b * ((t * i) - (z * c))
if (b <= (-1.35d-105)) then
tmp = (x * ((y * z) - (t * a))) + t_2
else if (b <= 2.5d+19) then
tmp = t_1 + (y * ((x * z) - (i * j)))
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 = a * ((c * j) - (x * t));
double t_2 = b * ((t * i) - (z * c));
double tmp;
if (b <= -1.35e-105) {
tmp = (x * ((y * z) - (t * a))) + t_2;
} else if (b <= 2.5e+19) {
tmp = t_1 + (y * ((x * z) - (i * j)));
} else {
tmp = t_1 + t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * ((c * j) - (x * t)) t_2 = b * ((t * i) - (z * c)) tmp = 0 if b <= -1.35e-105: tmp = (x * ((y * z) - (t * a))) + t_2 elif b <= 2.5e+19: tmp = t_1 + (y * ((x * z) - (i * j))) else: tmp = t_1 + t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(a * Float64(Float64(c * j) - Float64(x * t))) t_2 = Float64(b * Float64(Float64(t * i) - Float64(z * c))) tmp = 0.0 if (b <= -1.35e-105) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + t_2); elseif (b <= 2.5e+19) tmp = Float64(t_1 + Float64(y * Float64(Float64(x * z) - Float64(i * j)))); 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 = a * ((c * j) - (x * t)); t_2 = b * ((t * i) - (z * c)); tmp = 0.0; if (b <= -1.35e-105) tmp = (x * ((y * z) - (t * a))) + t_2; elseif (b <= 2.5e+19) tmp = t_1 + (y * ((x * z) - (i * j))); 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[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.35e-105], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], If[LessEqual[b, 2.5e+19], N[(t$95$1 + N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j - x \cdot t\right)\\
t_2 := b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{if}\;b \leq -1.35 \cdot 10^{-105}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + t\_2\\
\mathbf{elif}\;b \leq 2.5 \cdot 10^{+19}:\\
\;\;\;\;t\_1 + y \cdot \left(x \cdot z - i \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + t\_2\\
\end{array}
\end{array}
if b < -1.34999999999999996e-105Initial program 77.8%
Taylor expanded in j around 0 74.8%
if -1.34999999999999996e-105 < b < 2.5e19Initial program 73.7%
Taylor expanded in y around 0 73.0%
Simplified73.9%
Taylor expanded in b around 0 79.6%
if 2.5e19 < b Initial program 67.0%
Taylor expanded in y around 0 72.2%
mul-1-neg72.2%
distribute-rgt-neg-in72.2%
mul-1-neg72.2%
distribute-lft-in72.2%
+-commutative72.2%
mul-1-neg72.2%
unsub-neg72.2%
*-commutative72.2%
Simplified72.2%
Final simplification76.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1e+83)
(* b (* c (- (/ (* t i) c) z)))
(if (<= b 3e+145)
(+ (* a (- (* c j) (* x t))) (* y (- (* x z) (* i j))))
(* b (- (* t i) (* z c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1e+83) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 3e+145) {
tmp = (a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j)));
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-1d+83)) then
tmp = b * (c * (((t * i) / c) - z))
else if (b <= 3d+145) then
tmp = (a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j)))
else
tmp = b * ((t * i) - (z * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1e+83) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 3e+145) {
tmp = (a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j)));
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -1e+83: tmp = b * (c * (((t * i) / c) - z)) elif b <= 3e+145: tmp = (a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j))) else: tmp = b * ((t * i) - (z * c)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1e+83) tmp = Float64(b * Float64(c * Float64(Float64(Float64(t * i) / c) - z))); elseif (b <= 3e+145) tmp = Float64(Float64(a * Float64(Float64(c * j) - Float64(x * t))) + Float64(y * Float64(Float64(x * z) - Float64(i * j)))); else tmp = Float64(b * Float64(Float64(t * i) - Float64(z * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -1e+83) tmp = b * (c * (((t * i) / c) - z)); elseif (b <= 3e+145) tmp = (a * ((c * j) - (x * t))) + (y * ((x * z) - (i * j))); else tmp = b * ((t * i) - (z * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1e+83], N[(b * N[(c * N[(N[(N[(t * i), $MachinePrecision] / c), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3e+145], N[(N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+83}:\\
\;\;\;\;b \cdot \left(c \cdot \left(\frac{t \cdot i}{c} - z\right)\right)\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+145}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + y \cdot \left(x \cdot z - i \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\end{array}
\end{array}
if b < -1.00000000000000003e83Initial program 82.6%
Taylor expanded in b around inf 74.4%
Taylor expanded in c around inf 76.0%
if -1.00000000000000003e83 < b < 3.0000000000000002e145Initial program 72.9%
Taylor expanded in y around 0 74.1%
Simplified74.7%
Taylor expanded in b around 0 71.9%
if 3.0000000000000002e145 < b Initial program 59.4%
Taylor expanded in b around inf 76.9%
Final simplification73.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (* t i))) (t_2 (* a (* c j))))
(if (<= j -5.8e-71)
t_2
(if (<= j -4e-176)
t_1
(if (<= j -5.7e-294) (* z (* b (- c))) (if (<= j 1.15e+20) 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 = b * (t * i);
double t_2 = a * (c * j);
double tmp;
if (j <= -5.8e-71) {
tmp = t_2;
} else if (j <= -4e-176) {
tmp = t_1;
} else if (j <= -5.7e-294) {
tmp = z * (b * -c);
} else if (j <= 1.15e+20) {
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 = b * (t * i)
t_2 = a * (c * j)
if (j <= (-5.8d-71)) then
tmp = t_2
else if (j <= (-4d-176)) then
tmp = t_1
else if (j <= (-5.7d-294)) then
tmp = z * (b * -c)
else if (j <= 1.15d+20) 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 = b * (t * i);
double t_2 = a * (c * j);
double tmp;
if (j <= -5.8e-71) {
tmp = t_2;
} else if (j <= -4e-176) {
tmp = t_1;
} else if (j <= -5.7e-294) {
tmp = z * (b * -c);
} else if (j <= 1.15e+20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * (t * i) t_2 = a * (c * j) tmp = 0 if j <= -5.8e-71: tmp = t_2 elif j <= -4e-176: tmp = t_1 elif j <= -5.7e-294: tmp = z * (b * -c) elif j <= 1.15e+20: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(t * i)) t_2 = Float64(a * Float64(c * j)) tmp = 0.0 if (j <= -5.8e-71) tmp = t_2; elseif (j <= -4e-176) tmp = t_1; elseif (j <= -5.7e-294) tmp = Float64(z * Float64(b * Float64(-c))); elseif (j <= 1.15e+20) 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 = b * (t * i); t_2 = a * (c * j); tmp = 0.0; if (j <= -5.8e-71) tmp = t_2; elseif (j <= -4e-176) tmp = t_1; elseif (j <= -5.7e-294) tmp = z * (b * -c); elseif (j <= 1.15e+20) 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[(b * N[(t * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -5.8e-71], t$95$2, If[LessEqual[j, -4e-176], t$95$1, If[LessEqual[j, -5.7e-294], N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 1.15e+20], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(t \cdot i\right)\\
t_2 := a \cdot \left(c \cdot j\right)\\
\mathbf{if}\;j \leq -5.8 \cdot 10^{-71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;j \leq -4 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;j \leq -5.7 \cdot 10^{-294}:\\
\;\;\;\;z \cdot \left(b \cdot \left(-c\right)\right)\\
\mathbf{elif}\;j \leq 1.15 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if j < -5.7999999999999997e-71 or 1.15e20 < j Initial program 79.3%
Taylor expanded in a around inf 53.0%
+-commutative53.0%
mul-1-neg53.0%
unsub-neg53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in j around inf 39.7%
if -5.7999999999999997e-71 < j < -4e-176 or -5.70000000000000032e-294 < j < 1.15e20Initial program 66.2%
Taylor expanded in y around 0 74.4%
Simplified75.5%
Taylor expanded in i around inf 40.7%
+-commutative40.7%
mul-1-neg40.7%
unsub-neg40.7%
*-commutative40.7%
Simplified40.7%
Taylor expanded in b around inf 35.3%
if -4e-176 < j < -5.70000000000000032e-294Initial program 70.9%
Taylor expanded in z around inf 73.0%
*-commutative73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in y around 0 61.4%
mul-1-neg61.4%
distribute-rgt-neg-in61.4%
Simplified61.4%
Final simplification41.0%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -5.8e+82)
(* b (* c (- (/ (* t i) c) z)))
(if (<= b 6.7e+96)
(+ (* a (- (* c j) (* x t))) (* x (* y z)))
(* b (- (* t i) (* z c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -5.8e+82) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 6.7e+96) {
tmp = (a * ((c * j) - (x * t))) + (x * (y * z));
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-5.8d+82)) then
tmp = b * (c * (((t * i) / c) - z))
else if (b <= 6.7d+96) then
tmp = (a * ((c * j) - (x * t))) + (x * (y * z))
else
tmp = b * ((t * i) - (z * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -5.8e+82) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 6.7e+96) {
tmp = (a * ((c * j) - (x * t))) + (x * (y * z));
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -5.8e+82: tmp = b * (c * (((t * i) / c) - z)) elif b <= 6.7e+96: tmp = (a * ((c * j) - (x * t))) + (x * (y * z)) else: tmp = b * ((t * i) - (z * c)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -5.8e+82) tmp = Float64(b * Float64(c * Float64(Float64(Float64(t * i) / c) - z))); elseif (b <= 6.7e+96) tmp = Float64(Float64(a * Float64(Float64(c * j) - Float64(x * t))) + Float64(x * Float64(y * z))); else tmp = Float64(b * Float64(Float64(t * i) - Float64(z * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -5.8e+82) tmp = b * (c * (((t * i) / c) - z)); elseif (b <= 6.7e+96) tmp = (a * ((c * j) - (x * t))) + (x * (y * z)); else tmp = b * ((t * i) - (z * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -5.8e+82], N[(b * N[(c * N[(N[(N[(t * i), $MachinePrecision] / c), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.7e+96], N[(N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.8 \cdot 10^{+82}:\\
\;\;\;\;b \cdot \left(c \cdot \left(\frac{t \cdot i}{c} - z\right)\right)\\
\mathbf{elif}\;b \leq 6.7 \cdot 10^{+96}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right) + x \cdot \left(y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\end{array}
\end{array}
if b < -5.8000000000000003e82Initial program 82.6%
Taylor expanded in b around inf 74.4%
Taylor expanded in c around inf 76.0%
if -5.8000000000000003e82 < b < 6.70000000000000042e96Initial program 72.7%
Taylor expanded in y around 0 73.9%
Simplified74.5%
Taylor expanded in b around 0 72.2%
Taylor expanded in x around inf 61.9%
if 6.70000000000000042e96 < b Initial program 63.7%
Taylor expanded in b around inf 69.8%
Final simplification66.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -2.8e-28)
(* b (* c (- (/ (* t i) c) z)))
(if (<= b 4.7e-297)
(* (* x a) (- (* c (/ j x)) t))
(if (<= b 4e+154) (* j (- (* a c) (* y i))) (* b (- (* t i) (* z c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -2.8e-28) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 4.7e-297) {
tmp = (x * a) * ((c * (j / x)) - t);
} else if (b <= 4e+154) {
tmp = j * ((a * c) - (y * i));
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-2.8d-28)) then
tmp = b * (c * (((t * i) / c) - z))
else if (b <= 4.7d-297) then
tmp = (x * a) * ((c * (j / x)) - t)
else if (b <= 4d+154) then
tmp = j * ((a * c) - (y * i))
else
tmp = b * ((t * i) - (z * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -2.8e-28) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 4.7e-297) {
tmp = (x * a) * ((c * (j / x)) - t);
} else if (b <= 4e+154) {
tmp = j * ((a * c) - (y * i));
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -2.8e-28: tmp = b * (c * (((t * i) / c) - z)) elif b <= 4.7e-297: tmp = (x * a) * ((c * (j / x)) - t) elif b <= 4e+154: tmp = j * ((a * c) - (y * i)) else: tmp = b * ((t * i) - (z * c)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -2.8e-28) tmp = Float64(b * Float64(c * Float64(Float64(Float64(t * i) / c) - z))); elseif (b <= 4.7e-297) tmp = Float64(Float64(x * a) * Float64(Float64(c * Float64(j / x)) - t)); elseif (b <= 4e+154) tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); else tmp = Float64(b * Float64(Float64(t * i) - Float64(z * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -2.8e-28) tmp = b * (c * (((t * i) / c) - z)); elseif (b <= 4.7e-297) tmp = (x * a) * ((c * (j / x)) - t); elseif (b <= 4e+154) tmp = j * ((a * c) - (y * i)); else tmp = b * ((t * i) - (z * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -2.8e-28], N[(b * N[(c * N[(N[(N[(t * i), $MachinePrecision] / c), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.7e-297], N[(N[(x * a), $MachinePrecision] * N[(N[(c * N[(j / x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4e+154], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.8 \cdot 10^{-28}:\\
\;\;\;\;b \cdot \left(c \cdot \left(\frac{t \cdot i}{c} - z\right)\right)\\
\mathbf{elif}\;b \leq 4.7 \cdot 10^{-297}:\\
\;\;\;\;\left(x \cdot a\right) \cdot \left(c \cdot \frac{j}{x} - t\right)\\
\mathbf{elif}\;b \leq 4 \cdot 10^{+154}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\end{array}
\end{array}
if b < -2.7999999999999998e-28Initial program 78.7%
Taylor expanded in b around inf 67.3%
Taylor expanded in c around inf 69.8%
if -2.7999999999999998e-28 < b < 4.69999999999999986e-297Initial program 76.2%
Taylor expanded in x around inf 71.7%
fma-define73.3%
associate-/l*67.2%
fma-define67.2%
associate-/l*67.2%
Simplified67.2%
Taylor expanded in a around inf 53.7%
associate-*r*53.6%
associate-/l*55.3%
Simplified55.3%
if 4.69999999999999986e-297 < b < 4.00000000000000015e154Initial program 72.1%
Taylor expanded in y around 0 73.4%
Simplified73.4%
Taylor expanded in j around inf 55.7%
+-commutative55.7%
mul-1-neg55.7%
sub-neg55.7%
*-commutative55.7%
Simplified55.7%
if 4.00000000000000015e154 < b Initial program 59.4%
Taylor expanded in b around inf 76.9%
Final simplification62.2%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= b -1.2e-26)
(* b (* c (- (/ (* t i) c) z)))
(if (<= b 7.5e-293)
(* a (- (* c j) (* x t)))
(if (<= b 2.45e+145)
(* j (- (* a c) (* y i)))
(* b (- (* t i) (* z c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.2e-26) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 7.5e-293) {
tmp = a * ((c * j) - (x * t));
} else if (b <= 2.45e+145) {
tmp = j * ((a * c) - (y * i));
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (b <= (-1.2d-26)) then
tmp = b * (c * (((t * i) / c) - z))
else if (b <= 7.5d-293) then
tmp = a * ((c * j) - (x * t))
else if (b <= 2.45d+145) then
tmp = j * ((a * c) - (y * i))
else
tmp = b * ((t * i) - (z * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (b <= -1.2e-26) {
tmp = b * (c * (((t * i) / c) - z));
} else if (b <= 7.5e-293) {
tmp = a * ((c * j) - (x * t));
} else if (b <= 2.45e+145) {
tmp = j * ((a * c) - (y * i));
} else {
tmp = b * ((t * i) - (z * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if b <= -1.2e-26: tmp = b * (c * (((t * i) / c) - z)) elif b <= 7.5e-293: tmp = a * ((c * j) - (x * t)) elif b <= 2.45e+145: tmp = j * ((a * c) - (y * i)) else: tmp = b * ((t * i) - (z * c)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (b <= -1.2e-26) tmp = Float64(b * Float64(c * Float64(Float64(Float64(t * i) / c) - z))); elseif (b <= 7.5e-293) tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t))); elseif (b <= 2.45e+145) tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); else tmp = Float64(b * Float64(Float64(t * i) - Float64(z * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (b <= -1.2e-26) tmp = b * (c * (((t * i) / c) - z)); elseif (b <= 7.5e-293) tmp = a * ((c * j) - (x * t)); elseif (b <= 2.45e+145) tmp = j * ((a * c) - (y * i)); else tmp = b * ((t * i) - (z * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[b, -1.2e-26], N[(b * N[(c * N[(N[(N[(t * i), $MachinePrecision] / c), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e-293], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.45e+145], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.2 \cdot 10^{-26}:\\
\;\;\;\;b \cdot \left(c \cdot \left(\frac{t \cdot i}{c} - z\right)\right)\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-293}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{elif}\;b \leq 2.45 \cdot 10^{+145}:\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\end{array}
\end{array}
if b < -1.2e-26Initial program 78.7%
Taylor expanded in b around inf 67.3%
Taylor expanded in c around inf 69.8%
if -1.2e-26 < b < 7.50000000000000038e-293Initial program 76.2%
Taylor expanded in a around inf 55.1%
+-commutative55.1%
mul-1-neg55.1%
unsub-neg55.1%
*-commutative55.1%
Simplified55.1%
if 7.50000000000000038e-293 < b < 2.45000000000000001e145Initial program 72.1%
Taylor expanded in y around 0 73.4%
Simplified73.4%
Taylor expanded in j around inf 55.7%
+-commutative55.7%
mul-1-neg55.7%
sub-neg55.7%
*-commutative55.7%
Simplified55.7%
if 2.45000000000000001e145 < b Initial program 59.4%
Taylor expanded in b around inf 76.9%
Final simplification62.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= c -6.2e-29) (not (<= c 1.75e-36))) (* c (- (* a j) (* z b))) (* i (- (* t b) (* y j)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((c <= -6.2e-29) || !(c <= 1.75e-36)) {
tmp = c * ((a * j) - (z * b));
} else {
tmp = i * ((t * b) - (y * 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 ((c <= (-6.2d-29)) .or. (.not. (c <= 1.75d-36))) then
tmp = c * ((a * j) - (z * b))
else
tmp = i * ((t * b) - (y * 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 ((c <= -6.2e-29) || !(c <= 1.75e-36)) {
tmp = c * ((a * j) - (z * b));
} else {
tmp = i * ((t * b) - (y * j));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (c <= -6.2e-29) or not (c <= 1.75e-36): tmp = c * ((a * j) - (z * b)) else: tmp = i * ((t * b) - (y * j)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((c <= -6.2e-29) || !(c <= 1.75e-36)) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); else tmp = Float64(i * Float64(Float64(t * b) - Float64(y * j))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((c <= -6.2e-29) || ~((c <= 1.75e-36))) tmp = c * ((a * j) - (z * b)); else tmp = i * ((t * b) - (y * j)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[c, -6.2e-29], N[Not[LessEqual[c, 1.75e-36]], $MachinePrecision]], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(N[(t * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;c \leq -6.2 \cdot 10^{-29} \lor \neg \left(c \leq 1.75 \cdot 10^{-36}\right):\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(t \cdot b - y \cdot j\right)\\
\end{array}
\end{array}
if c < -6.20000000000000052e-29 or 1.75e-36 < c Initial program 67.2%
Taylor expanded in c around inf 66.2%
*-commutative66.2%
Simplified66.2%
if -6.20000000000000052e-29 < c < 1.75e-36Initial program 82.7%
Taylor expanded in y around 0 82.7%
Simplified83.6%
Taylor expanded in i around inf 51.1%
+-commutative51.1%
mul-1-neg51.1%
unsub-neg51.1%
*-commutative51.1%
Simplified51.1%
Final simplification60.0%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= b -1.3e-26) (not (<= b 2.05e+14))) (* 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 <= -1.3e-26) || !(b <= 2.05e+14)) {
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 <= (-1.3d-26)) .or. (.not. (b <= 2.05d+14))) 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 <= -1.3e-26) || !(b <= 2.05e+14)) {
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 <= -1.3e-26) or not (b <= 2.05e+14): 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 <= -1.3e-26) || !(b <= 2.05e+14)) 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 <= -1.3e-26) || ~((b <= 2.05e+14))) 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, -1.3e-26], N[Not[LessEqual[b, 2.05e+14]], $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.3 \cdot 10^{-26} \lor \neg \left(b \leq 2.05 \cdot 10^{+14}\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 < -1.30000000000000005e-26 or 2.05e14 < b Initial program 72.9%
Taylor expanded in b around inf 63.6%
if -1.30000000000000005e-26 < b < 2.05e14Initial program 74.3%
Taylor expanded in a around inf 52.4%
+-commutative52.4%
mul-1-neg52.4%
unsub-neg52.4%
*-commutative52.4%
Simplified52.4%
Final simplification58.4%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= i -5.5e+117) (not (<= i 6.2e+215))) (* b (* t i)) (* 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 ((i <= -5.5e+117) || !(i <= 6.2e+215)) {
tmp = b * (t * i);
} 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 ((i <= (-5.5d+117)) .or. (.not. (i <= 6.2d+215))) then
tmp = b * (t * i)
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 ((i <= -5.5e+117) || !(i <= 6.2e+215)) {
tmp = b * (t * i);
} else {
tmp = a * ((c * j) - (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (i <= -5.5e+117) or not (i <= 6.2e+215): tmp = b * (t * i) else: tmp = a * ((c * j) - (x * t)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((i <= -5.5e+117) || !(i <= 6.2e+215)) tmp = Float64(b * Float64(t * i)); 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 ((i <= -5.5e+117) || ~((i <= 6.2e+215))) tmp = b * (t * i); 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[i, -5.5e+117], N[Not[LessEqual[i, 6.2e+215]], $MachinePrecision]], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -5.5 \cdot 10^{+117} \lor \neg \left(i \leq 6.2 \cdot 10^{+215}\right):\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\
\end{array}
\end{array}
if i < -5.49999999999999965e117 or 6.1999999999999998e215 < i Initial program 52.2%
Taylor expanded in y around 0 59.1%
Simplified60.9%
Taylor expanded in i around inf 82.5%
+-commutative82.5%
mul-1-neg82.5%
unsub-neg82.5%
*-commutative82.5%
Simplified82.5%
Taylor expanded in b around inf 61.5%
if -5.49999999999999965e117 < i < 6.1999999999999998e215Initial program 79.5%
Taylor expanded in a around inf 44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
*-commutative44.4%
Simplified44.4%
Final simplification48.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= i -5.2e+89) (not (<= i 1.4e+215))) (* b (* t 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 ((i <= -5.2e+89) || !(i <= 1.4e+215)) {
tmp = b * (t * 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 ((i <= (-5.2d+89)) .or. (.not. (i <= 1.4d+215))) then
tmp = b * (t * 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 ((i <= -5.2e+89) || !(i <= 1.4e+215)) {
tmp = b * (t * i);
} else {
tmp = a * (c * j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (i <= -5.2e+89) or not (i <= 1.4e+215): tmp = b * (t * i) else: tmp = a * (c * j) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((i <= -5.2e+89) || !(i <= 1.4e+215)) tmp = Float64(b * Float64(t * 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 ((i <= -5.2e+89) || ~((i <= 1.4e+215))) tmp = b * (t * i); else tmp = a * (c * j); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[i, -5.2e+89], N[Not[LessEqual[i, 1.4e+215]], $MachinePrecision]], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -5.2 \cdot 10^{+89} \lor \neg \left(i \leq 1.4 \cdot 10^{+215}\right):\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\end{array}
\end{array}
if i < -5.2000000000000001e89 or 1.4e215 < i Initial program 57.5%
Taylor expanded in y around 0 63.6%
Simplified65.2%
Taylor expanded in i around inf 79.8%
+-commutative79.8%
mul-1-neg79.8%
unsub-neg79.8%
*-commutative79.8%
Simplified79.8%
Taylor expanded in b around inf 59.6%
if -5.2000000000000001e89 < i < 1.4e215Initial program 78.8%
Taylor expanded in a around inf 44.4%
+-commutative44.4%
mul-1-neg44.4%
unsub-neg44.4%
*-commutative44.4%
Simplified44.4%
Taylor expanded in j around inf 29.2%
Final simplification36.7%
(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 73.6%
Taylor expanded in a around inf 39.6%
+-commutative39.6%
mul-1-neg39.6%
unsub-neg39.6%
*-commutative39.6%
Simplified39.6%
Taylor expanded in j around inf 24.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 2024128
(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)))))