
(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
(-
(* j (- (* a c) (* y i)))
(+ (* b (- (* z c) (* t i))) (* x (- (* t a) (* y z)))))))
(if (<= t_1 INFINITY) t_1 (* c (- (* a j) (* z b))))))
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))) - ((b * ((z * c) - (t * i))) + (x * ((t * a) - (y * z))));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = c * ((a * j) - (z * b));
}
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 = (j * ((a * c) - (y * i))) - ((b * ((z * c) - (t * i))) + (x * ((t * a) - (y * z))));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = c * ((a * j) - (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * ((a * c) - (y * i))) - ((b * ((z * c) - (t * i))) + (x * ((t * a) - (y * z)))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = c * ((a * j) - (z * b)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * Float64(Float64(a * c) - Float64(y * i))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(t * i))) + Float64(x * Float64(Float64(t * a) - Float64(y * z))))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = (j * ((a * c) - (y * i))) - ((b * ((z * c) - (t * i))) + (x * ((t * a) - (y * z)))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = c * ((a * j) - (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(N[(t * a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - y \cdot i\right) - \left(b \cdot \left(z \cdot c - t \cdot i\right) + x \cdot \left(t \cdot a - y \cdot z\right)\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\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 93.6%
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%
cancel-sign-sub0.0%
cancel-sign-sub-inv0.0%
*-commutative0.0%
remove-double-neg0.0%
*-commutative0.0%
Simplified0.0%
Taylor expanded in c around inf 54.1%
Final simplification85.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* y (- (* x z) (* i j)))))
(if (<= y -8.2e+149)
t_1
(if (<= y 2.6e-46)
(- (- (* c (* a j)) (* a (* x t))) (* b (- (* z c) (* t i))))
(if (<= y 3.9e+140)
(+ (* x (- (* y z) (* t a))) (* 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 = y * ((x * z) - (i * j));
double tmp;
if (y <= -8.2e+149) {
tmp = t_1;
} else if (y <= 2.6e-46) {
tmp = ((c * (a * j)) - (a * (x * t))) - (b * ((z * c) - (t * i)));
} else if (y <= 3.9e+140) {
tmp = (x * ((y * z) - (t * a))) + (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 = y * ((x * z) - (i * j))
if (y <= (-8.2d+149)) then
tmp = t_1
else if (y <= 2.6d-46) then
tmp = ((c * (a * j)) - (a * (x * t))) - (b * ((z * c) - (t * i)))
else if (y <= 3.9d+140) then
tmp = (x * ((y * z) - (t * a))) + (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 = y * ((x * z) - (i * j));
double tmp;
if (y <= -8.2e+149) {
tmp = t_1;
} else if (y <= 2.6e-46) {
tmp = ((c * (a * j)) - (a * (x * t))) - (b * ((z * c) - (t * i)));
} else if (y <= 3.9e+140) {
tmp = (x * ((y * z) - (t * a))) + (j * ((a * c) - (y * i)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = y * ((x * z) - (i * j)) tmp = 0 if y <= -8.2e+149: tmp = t_1 elif y <= 2.6e-46: tmp = ((c * (a * j)) - (a * (x * t))) - (b * ((z * c) - (t * i))) elif y <= 3.9e+140: tmp = (x * ((y * z) - (t * a))) + (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(y * Float64(Float64(x * z) - Float64(i * j))) tmp = 0.0 if (y <= -8.2e+149) tmp = t_1; elseif (y <= 2.6e-46) tmp = Float64(Float64(Float64(c * Float64(a * j)) - Float64(a * Float64(x * t))) - Float64(b * Float64(Float64(z * c) - Float64(t * i)))); elseif (y <= 3.9e+140) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + 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 = y * ((x * z) - (i * j)); tmp = 0.0; if (y <= -8.2e+149) tmp = t_1; elseif (y <= 2.6e-46) tmp = ((c * (a * j)) - (a * (x * t))) - (b * ((z * c) - (t * i))); elseif (y <= 3.9e+140) tmp = (x * ((y * z) - (t * a))) + (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[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.2e+149], t$95$1, If[LessEqual[y, 2.6e-46], N[(N[(N[(c * N[(a * j), $MachinePrecision]), $MachinePrecision] - N[(a * N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(z * c), $MachinePrecision] - N[(t * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+140], 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], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(x \cdot z - i \cdot j\right)\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-46}:\\
\;\;\;\;\left(c \cdot \left(a \cdot j\right) - a \cdot \left(x \cdot t\right)\right) - b \cdot \left(z \cdot c - t \cdot i\right)\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+140}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -8.1999999999999992e149 or 3.89999999999999974e140 < y Initial program 53.0%
cancel-sign-sub53.0%
cancel-sign-sub-inv53.0%
*-commutative53.0%
remove-double-neg53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in y around -inf 73.4%
mul-1-neg73.4%
distribute-rgt-neg-in73.4%
mul-1-neg73.4%
unsub-neg73.4%
*-commutative73.4%
Simplified73.4%
if -8.1999999999999992e149 < y < 2.6000000000000002e-46Initial program 81.2%
cancel-sign-sub81.2%
cancel-sign-sub-inv81.2%
*-commutative81.2%
remove-double-neg81.2%
*-commutative81.2%
Simplified81.2%
Taylor expanded in y around 0 75.1%
if 2.6000000000000002e-46 < y < 3.89999999999999974e140Initial program 78.8%
cancel-sign-sub78.8%
cancel-sign-sub-inv78.8%
*-commutative78.8%
remove-double-neg78.8%
*-commutative78.8%
Simplified78.8%
Taylor expanded in b around 0 81.3%
Final simplification75.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* t i) (* z c))))
(t_2 (* y (- (* x z) (* i j))))
(t_3 (* a (- (* c j) (* x t)))))
(if (<= a -2.55e+156)
t_3
(if (<= a -4.4e-36)
(* c (- (* a j) (* z b)))
(if (<= a -7.5e-272)
t_1
(if (<= a 1.9e-172)
t_2
(if (<= a 2.9e-128)
t_1
(if (<= a 4.3e-100) t_2 (if (<= a 118.0) t_1 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((t * i) - (z * c));
double t_2 = y * ((x * z) - (i * j));
double t_3 = a * ((c * j) - (x * t));
double tmp;
if (a <= -2.55e+156) {
tmp = t_3;
} else if (a <= -4.4e-36) {
tmp = c * ((a * j) - (z * b));
} else if (a <= -7.5e-272) {
tmp = t_1;
} else if (a <= 1.9e-172) {
tmp = t_2;
} else if (a <= 2.9e-128) {
tmp = t_1;
} else if (a <= 4.3e-100) {
tmp = t_2;
} else if (a <= 118.0) {
tmp = t_1;
} else {
tmp = t_3;
}
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) :: t_3
real(8) :: tmp
t_1 = b * ((t * i) - (z * c))
t_2 = y * ((x * z) - (i * j))
t_3 = a * ((c * j) - (x * t))
if (a <= (-2.55d+156)) then
tmp = t_3
else if (a <= (-4.4d-36)) then
tmp = c * ((a * j) - (z * b))
else if (a <= (-7.5d-272)) then
tmp = t_1
else if (a <= 1.9d-172) then
tmp = t_2
else if (a <= 2.9d-128) then
tmp = t_1
else if (a <= 4.3d-100) then
tmp = t_2
else if (a <= 118.0d0) then
tmp = t_1
else
tmp = t_3
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 t_2 = y * ((x * z) - (i * j));
double t_3 = a * ((c * j) - (x * t));
double tmp;
if (a <= -2.55e+156) {
tmp = t_3;
} else if (a <= -4.4e-36) {
tmp = c * ((a * j) - (z * b));
} else if (a <= -7.5e-272) {
tmp = t_1;
} else if (a <= 1.9e-172) {
tmp = t_2;
} else if (a <= 2.9e-128) {
tmp = t_1;
} else if (a <= 4.3e-100) {
tmp = t_2;
} else if (a <= 118.0) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((t * i) - (z * c)) t_2 = y * ((x * z) - (i * j)) t_3 = a * ((c * j) - (x * t)) tmp = 0 if a <= -2.55e+156: tmp = t_3 elif a <= -4.4e-36: tmp = c * ((a * j) - (z * b)) elif a <= -7.5e-272: tmp = t_1 elif a <= 1.9e-172: tmp = t_2 elif a <= 2.9e-128: tmp = t_1 elif a <= 4.3e-100: tmp = t_2 elif a <= 118.0: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(t * i) - Float64(z * c))) t_2 = Float64(y * Float64(Float64(x * z) - Float64(i * j))) t_3 = Float64(a * Float64(Float64(c * j) - Float64(x * t))) tmp = 0.0 if (a <= -2.55e+156) tmp = t_3; elseif (a <= -4.4e-36) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); elseif (a <= -7.5e-272) tmp = t_1; elseif (a <= 1.9e-172) tmp = t_2; elseif (a <= 2.9e-128) tmp = t_1; elseif (a <= 4.3e-100) tmp = t_2; elseif (a <= 118.0) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((t * i) - (z * c)); t_2 = y * ((x * z) - (i * j)); t_3 = a * ((c * j) - (x * t)); tmp = 0.0; if (a <= -2.55e+156) tmp = t_3; elseif (a <= -4.4e-36) tmp = c * ((a * j) - (z * b)); elseif (a <= -7.5e-272) tmp = t_1; elseif (a <= 1.9e-172) tmp = t_2; elseif (a <= 2.9e-128) tmp = t_1; elseif (a <= 4.3e-100) tmp = t_2; elseif (a <= 118.0) tmp = t_1; else tmp = t_3; 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]}, Block[{t$95$2 = N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.55e+156], t$95$3, If[LessEqual[a, -4.4e-36], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -7.5e-272], t$95$1, If[LessEqual[a, 1.9e-172], t$95$2, If[LessEqual[a, 2.9e-128], t$95$1, If[LessEqual[a, 4.3e-100], t$95$2, If[LessEqual[a, 118.0], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(t \cdot i - z \cdot c\right)\\
t_2 := y \cdot \left(x \cdot z - i \cdot j\right)\\
t_3 := a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{if}\;a \leq -2.55 \cdot 10^{+156}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-36}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{-272}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-172}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-128}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{-100}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 118:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -2.55000000000000007e156 or 118 < a Initial program 64.7%
cancel-sign-sub64.7%
cancel-sign-sub-inv64.7%
*-commutative64.7%
remove-double-neg64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in a around inf 74.3%
+-commutative74.3%
mul-1-neg74.3%
unsub-neg74.3%
*-commutative74.3%
Simplified74.3%
if -2.55000000000000007e156 < a < -4.3999999999999999e-36Initial program 83.6%
cancel-sign-sub83.6%
cancel-sign-sub-inv83.6%
*-commutative83.6%
remove-double-neg83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in c around inf 53.2%
if -4.3999999999999999e-36 < a < -7.50000000000000005e-272 or 1.89999999999999993e-172 < a < 2.9e-128 or 4.29999999999999998e-100 < a < 118Initial program 82.6%
cancel-sign-sub82.6%
cancel-sign-sub-inv82.6%
*-commutative82.6%
remove-double-neg82.6%
*-commutative82.6%
Simplified82.6%
Taylor expanded in b around inf 72.8%
if -7.50000000000000005e-272 < a < 1.89999999999999993e-172 or 2.9e-128 < a < 4.29999999999999998e-100Initial program 70.6%
cancel-sign-sub70.6%
cancel-sign-sub-inv70.6%
*-commutative70.6%
remove-double-neg70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in y around -inf 73.7%
mul-1-neg73.7%
distribute-rgt-neg-in73.7%
mul-1-neg73.7%
unsub-neg73.7%
*-commutative73.7%
Simplified73.7%
Final simplification70.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* a c) (* y i)))))
(if (<= j -1.95e+43)
t_1
(if (<= j 9.2e+127)
(- (* b (- (* t i) (* z c))) (* t (* x a)))
(+ (* x (- (* y z) (* t 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 <= -1.95e+43) {
tmp = t_1;
} else if (j <= 9.2e+127) {
tmp = (b * ((t * i) - (z * c))) - (t * (x * a));
} else {
tmp = (x * ((y * z) - (t * a))) + 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 <= (-1.95d+43)) then
tmp = t_1
else if (j <= 9.2d+127) then
tmp = (b * ((t * i) - (z * c))) - (t * (x * a))
else
tmp = (x * ((y * z) - (t * a))) + 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 <= -1.95e+43) {
tmp = t_1;
} else if (j <= 9.2e+127) {
tmp = (b * ((t * i) - (z * c))) - (t * (x * a));
} else {
tmp = (x * ((y * z) - (t * a))) + 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 <= -1.95e+43: tmp = t_1 elif j <= 9.2e+127: tmp = (b * ((t * i) - (z * c))) - (t * (x * a)) else: tmp = (x * ((y * z) - (t * a))) + 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 <= -1.95e+43) tmp = t_1; elseif (j <= 9.2e+127) tmp = Float64(Float64(b * Float64(Float64(t * i) - Float64(z * c))) - Float64(t * Float64(x * a))); else tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + 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 <= -1.95e+43) tmp = t_1; elseif (j <= 9.2e+127) tmp = (b * ((t * i) - (z * c))) - (t * (x * a)); else tmp = (x * ((y * z) - (t * a))) + 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, -1.95e+43], t$95$1, If[LessEqual[j, 9.2e+127], N[(N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -1.95 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq 9.2 \cdot 10^{+127}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right) - t \cdot \left(x \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + t_1\\
\end{array}
\end{array}
if j < -1.95e43Initial program 70.5%
cancel-sign-sub70.5%
cancel-sign-sub-inv70.5%
*-commutative70.5%
remove-double-neg70.5%
*-commutative70.5%
Simplified70.5%
Taylor expanded in j around inf 66.6%
if -1.95e43 < j < 9.2000000000000007e127Initial program 70.8%
cancel-sign-sub70.8%
cancel-sign-sub-inv70.8%
*-commutative70.8%
remove-double-neg70.8%
*-commutative70.8%
Simplified70.8%
Taylor expanded in y around 0 69.9%
Taylor expanded in j around 0 65.9%
sub-neg65.9%
+-commutative65.9%
neg-mul-165.9%
unsub-neg65.9%
*-commutative65.9%
*-commutative65.9%
distribute-rgt-neg-in65.9%
neg-sub065.9%
associate-+l-65.9%
neg-sub065.9%
+-commutative65.9%
*-commutative65.9%
sub-neg65.9%
*-commutative65.9%
associate-*l*69.9%
*-commutative69.9%
Simplified69.9%
if 9.2000000000000007e127 < j Initial program 85.3%
cancel-sign-sub85.3%
cancel-sign-sub-inv85.3%
*-commutative85.3%
remove-double-neg85.3%
*-commutative85.3%
Simplified85.3%
Taylor expanded in b around 0 83.3%
Final simplification71.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= j -4.5e+43) (not (<= j 2.5e+104))) (* j (- (* a c) (* y i))) (- (* b (- (* t i) (* z c))) (* t (* x a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((j <= -4.5e+43) || !(j <= 2.5e+104)) {
tmp = j * ((a * c) - (y * i));
} else {
tmp = (b * ((t * i) - (z * c))) - (t * (x * a));
}
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 <= (-4.5d+43)) .or. (.not. (j <= 2.5d+104))) then
tmp = j * ((a * c) - (y * i))
else
tmp = (b * ((t * i) - (z * c))) - (t * (x * a))
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 <= -4.5e+43) || !(j <= 2.5e+104)) {
tmp = j * ((a * c) - (y * i));
} else {
tmp = (b * ((t * i) - (z * c))) - (t * (x * a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (j <= -4.5e+43) or not (j <= 2.5e+104): tmp = j * ((a * c) - (y * i)) else: tmp = (b * ((t * i) - (z * c))) - (t * (x * a)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((j <= -4.5e+43) || !(j <= 2.5e+104)) tmp = Float64(j * Float64(Float64(a * c) - Float64(y * i))); else tmp = Float64(Float64(b * Float64(Float64(t * i) - Float64(z * c))) - Float64(t * Float64(x * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((j <= -4.5e+43) || ~((j <= 2.5e+104))) tmp = j * ((a * c) - (y * i)); else tmp = (b * ((t * i) - (z * c))) - (t * (x * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[j, -4.5e+43], N[Not[LessEqual[j, 2.5e+104]], $MachinePrecision]], N[(j * N[(N[(a * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t * N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -4.5 \cdot 10^{+43} \lor \neg \left(j \leq 2.5 \cdot 10^{+104}\right):\\
\;\;\;\;j \cdot \left(a \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right) - t \cdot \left(x \cdot a\right)\\
\end{array}
\end{array}
if j < -4.5e43 or 2.4999999999999998e104 < j Initial program 75.1%
cancel-sign-sub75.1%
cancel-sign-sub-inv75.1%
*-commutative75.1%
remove-double-neg75.1%
*-commutative75.1%
Simplified75.1%
Taylor expanded in j around inf 69.7%
if -4.5e43 < j < 2.4999999999999998e104Initial program 71.6%
cancel-sign-sub71.6%
cancel-sign-sub-inv71.6%
*-commutative71.6%
remove-double-neg71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in y around 0 70.6%
Taylor expanded in j around 0 66.6%
sub-neg66.6%
+-commutative66.6%
neg-mul-166.6%
unsub-neg66.6%
*-commutative66.6%
*-commutative66.6%
distribute-rgt-neg-in66.6%
neg-sub066.6%
associate-+l-66.6%
neg-sub066.6%
+-commutative66.6%
*-commutative66.6%
sub-neg66.6%
*-commutative66.6%
associate-*l*70.7%
*-commutative70.7%
Simplified70.7%
Final simplification70.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (- (* c j) (* x t)))))
(if (<= a -3.7e+156)
t_1
(if (<= a -2.4e-35)
(* c (- (* a j) (* z b)))
(if (<= a 1.02e-199)
(* i (- (* t b) (* y j)))
(if (<= a 1450.0) (* 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 = a * ((c * j) - (x * t));
double tmp;
if (a <= -3.7e+156) {
tmp = t_1;
} else if (a <= -2.4e-35) {
tmp = c * ((a * j) - (z * b));
} else if (a <= 1.02e-199) {
tmp = i * ((t * b) - (y * j));
} else if (a <= 1450.0) {
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 = a * ((c * j) - (x * t))
if (a <= (-3.7d+156)) then
tmp = t_1
else if (a <= (-2.4d-35)) then
tmp = c * ((a * j) - (z * b))
else if (a <= 1.02d-199) then
tmp = i * ((t * b) - (y * j))
else if (a <= 1450.0d0) 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 = a * ((c * j) - (x * t));
double tmp;
if (a <= -3.7e+156) {
tmp = t_1;
} else if (a <= -2.4e-35) {
tmp = c * ((a * j) - (z * b));
} else if (a <= 1.02e-199) {
tmp = i * ((t * b) - (y * j));
} else if (a <= 1450.0) {
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 = a * ((c * j) - (x * t)) tmp = 0 if a <= -3.7e+156: tmp = t_1 elif a <= -2.4e-35: tmp = c * ((a * j) - (z * b)) elif a <= 1.02e-199: tmp = i * ((t * b) - (y * j)) elif a <= 1450.0: 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(a * Float64(Float64(c * j) - Float64(x * t))) tmp = 0.0 if (a <= -3.7e+156) tmp = t_1; elseif (a <= -2.4e-35) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); elseif (a <= 1.02e-199) tmp = Float64(i * Float64(Float64(t * b) - Float64(y * j))); elseif (a <= 1450.0) 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 = a * ((c * j) - (x * t)); tmp = 0.0; if (a <= -3.7e+156) tmp = t_1; elseif (a <= -2.4e-35) tmp = c * ((a * j) - (z * b)); elseif (a <= 1.02e-199) tmp = i * ((t * b) - (y * j)); elseif (a <= 1450.0) 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[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+156], t$95$1, If[LessEqual[a, -2.4e-35], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.02e-199], N[(i * N[(N[(t * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1450.0], N[(b * N[(N[(t * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{+156}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-35}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{-199}:\\
\;\;\;\;i \cdot \left(t \cdot b - y \cdot j\right)\\
\mathbf{elif}\;a \leq 1450:\\
\;\;\;\;b \cdot \left(t \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -3.70000000000000001e156 or 1450 < a Initial program 64.7%
cancel-sign-sub64.7%
cancel-sign-sub-inv64.7%
*-commutative64.7%
remove-double-neg64.7%
*-commutative64.7%
Simplified64.7%
Taylor expanded in a around inf 74.3%
+-commutative74.3%
mul-1-neg74.3%
unsub-neg74.3%
*-commutative74.3%
Simplified74.3%
if -3.70000000000000001e156 < a < -2.4000000000000001e-35Initial program 83.1%
cancel-sign-sub83.1%
cancel-sign-sub-inv83.1%
*-commutative83.1%
remove-double-neg83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in c around inf 54.5%
if -2.4000000000000001e-35 < a < 1.02e-199Initial program 75.5%
cancel-sign-sub75.5%
cancel-sign-sub-inv75.5%
*-commutative75.5%
remove-double-neg75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in i around inf 57.1%
associate-*r*57.1%
neg-mul-157.1%
cancel-sign-sub57.1%
+-commutative57.1%
mul-1-neg57.1%
unsub-neg57.1%
Simplified57.1%
if 1.02e-199 < a < 1450Initial program 83.1%
cancel-sign-sub83.1%
cancel-sign-sub-inv83.1%
*-commutative83.1%
remove-double-neg83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in b around inf 62.3%
Final simplification65.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (- (* c j) (* x t)))))
(if (<= a -1.5e+177)
t_1
(if (<= a -6e-228)
(* c (- (* a j) (* z b)))
(if (<= a 5.3e-24) (* i (* t b)) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * ((c * j) - (x * t));
double tmp;
if (a <= -1.5e+177) {
tmp = t_1;
} else if (a <= -6e-228) {
tmp = c * ((a * j) - (z * b));
} else if (a <= 5.3e-24) {
tmp = i * (t * b);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((c * j) - (x * t))
if (a <= (-1.5d+177)) then
tmp = t_1
else if (a <= (-6d-228)) then
tmp = c * ((a * j) - (z * b))
else if (a <= 5.3d-24) then
tmp = i * (t * b)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * ((c * j) - (x * t));
double tmp;
if (a <= -1.5e+177) {
tmp = t_1;
} else if (a <= -6e-228) {
tmp = c * ((a * j) - (z * b));
} else if (a <= 5.3e-24) {
tmp = i * (t * b);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * ((c * j) - (x * t)) tmp = 0 if a <= -1.5e+177: tmp = t_1 elif a <= -6e-228: tmp = c * ((a * j) - (z * b)) elif a <= 5.3e-24: tmp = i * (t * b) else: tmp = t_1 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 (a <= -1.5e+177) tmp = t_1; elseif (a <= -6e-228) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); elseif (a <= 5.3e-24) tmp = Float64(i * Float64(t * b)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * ((c * j) - (x * t)); tmp = 0.0; if (a <= -1.5e+177) tmp = t_1; elseif (a <= -6e-228) tmp = c * ((a * j) - (z * b)); elseif (a <= 5.3e-24) tmp = i * (t * b); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.5e+177], t$95$1, If[LessEqual[a, -6e-228], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.3e-24], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{if}\;a \leq -1.5 \cdot 10^{+177}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -6 \cdot 10^{-228}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{elif}\;a \leq 5.3 \cdot 10^{-24}:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.5e177 or 5.29999999999999969e-24 < a Initial program 64.8%
cancel-sign-sub64.8%
cancel-sign-sub-inv64.8%
*-commutative64.8%
remove-double-neg64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in a around inf 74.2%
+-commutative74.2%
mul-1-neg74.2%
unsub-neg74.2%
*-commutative74.2%
Simplified74.2%
if -1.5e177 < a < -5.9999999999999999e-228Initial program 80.4%
cancel-sign-sub80.4%
cancel-sign-sub-inv80.4%
*-commutative80.4%
remove-double-neg80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in c around inf 48.7%
if -5.9999999999999999e-228 < a < 5.29999999999999969e-24Initial program 79.1%
cancel-sign-sub79.1%
cancel-sign-sub-inv79.1%
*-commutative79.1%
remove-double-neg79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in y around 0 48.9%
Taylor expanded in i around inf 36.5%
Final simplification56.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* a (- (* c j) (* x t)))))
(if (<= a -1.55e+158)
t_1
(if (<= a -2.5e-32)
(* c (- (* a j) (* z b)))
(if (<= a 3.7e-23) (* i (- (* t b) (* y j))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * ((c * j) - (x * t));
double tmp;
if (a <= -1.55e+158) {
tmp = t_1;
} else if (a <= -2.5e-32) {
tmp = c * ((a * j) - (z * b));
} else if (a <= 3.7e-23) {
tmp = i * ((t * b) - (y * j));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((c * j) - (x * t))
if (a <= (-1.55d+158)) then
tmp = t_1
else if (a <= (-2.5d-32)) then
tmp = c * ((a * j) - (z * b))
else if (a <= 3.7d-23) then
tmp = i * ((t * b) - (y * j))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = a * ((c * j) - (x * t));
double tmp;
if (a <= -1.55e+158) {
tmp = t_1;
} else if (a <= -2.5e-32) {
tmp = c * ((a * j) - (z * b));
} else if (a <= 3.7e-23) {
tmp = i * ((t * b) - (y * j));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = a * ((c * j) - (x * t)) tmp = 0 if a <= -1.55e+158: tmp = t_1 elif a <= -2.5e-32: tmp = c * ((a * j) - (z * b)) elif a <= 3.7e-23: tmp = i * ((t * b) - (y * j)) else: tmp = t_1 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 (a <= -1.55e+158) tmp = t_1; elseif (a <= -2.5e-32) tmp = Float64(c * Float64(Float64(a * j) - Float64(z * b))); elseif (a <= 3.7e-23) tmp = Float64(i * Float64(Float64(t * b) - Float64(y * j))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = a * ((c * j) - (x * t)); tmp = 0.0; if (a <= -1.55e+158) tmp = t_1; elseif (a <= -2.5e-32) tmp = c * ((a * j) - (z * b)); elseif (a <= 3.7e-23) tmp = i * ((t * b) - (y * j)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.55e+158], t$95$1, If[LessEqual[a, -2.5e-32], N[(c * N[(N[(a * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.7e-23], N[(i * N[(N[(t * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{if}\;a \leq -1.55 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-32}:\\
\;\;\;\;c \cdot \left(a \cdot j - z \cdot b\right)\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{-23}:\\
\;\;\;\;i \cdot \left(t \cdot b - y \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.5500000000000001e158 or 3.7000000000000003e-23 < a Initial program 64.2%
cancel-sign-sub64.2%
cancel-sign-sub-inv64.2%
*-commutative64.2%
remove-double-neg64.2%
*-commutative64.2%
Simplified64.2%
Taylor expanded in a around inf 73.5%
+-commutative73.5%
mul-1-neg73.5%
unsub-neg73.5%
*-commutative73.5%
Simplified73.5%
if -1.5500000000000001e158 < a < -2.5e-32Initial program 83.1%
cancel-sign-sub83.1%
cancel-sign-sub-inv83.1%
*-commutative83.1%
remove-double-neg83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in c around inf 54.5%
if -2.5e-32 < a < 3.7000000000000003e-23Initial program 79.4%
cancel-sign-sub79.4%
cancel-sign-sub-inv79.4%
*-commutative79.4%
remove-double-neg79.4%
*-commutative79.4%
Simplified79.4%
Taylor expanded in i around inf 54.6%
associate-*r*54.6%
neg-mul-154.6%
cancel-sign-sub54.6%
+-commutative54.6%
mul-1-neg54.6%
unsub-neg54.6%
Simplified54.6%
Final simplification63.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (* x (- a)))) (t_2 (* a (* c j))))
(if (<= j -8.8e+33)
t_2
(if (<= j -4.4e-146)
t_1
(if (<= j 3e-128) (* t (* b i)) (if (<= j 0.032) 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 = t * (x * -a);
double t_2 = a * (c * j);
double tmp;
if (j <= -8.8e+33) {
tmp = t_2;
} else if (j <= -4.4e-146) {
tmp = t_1;
} else if (j <= 3e-128) {
tmp = t * (b * i);
} else if (j <= 0.032) {
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 = t * (x * -a)
t_2 = a * (c * j)
if (j <= (-8.8d+33)) then
tmp = t_2
else if (j <= (-4.4d-146)) then
tmp = t_1
else if (j <= 3d-128) then
tmp = t * (b * i)
else if (j <= 0.032d0) 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 = t * (x * -a);
double t_2 = a * (c * j);
double tmp;
if (j <= -8.8e+33) {
tmp = t_2;
} else if (j <= -4.4e-146) {
tmp = t_1;
} else if (j <= 3e-128) {
tmp = t * (b * i);
} else if (j <= 0.032) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = t * (x * -a) t_2 = a * (c * j) tmp = 0 if j <= -8.8e+33: tmp = t_2 elif j <= -4.4e-146: tmp = t_1 elif j <= 3e-128: tmp = t * (b * i) elif j <= 0.032: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * Float64(x * Float64(-a))) t_2 = Float64(a * Float64(c * j)) tmp = 0.0 if (j <= -8.8e+33) tmp = t_2; elseif (j <= -4.4e-146) tmp = t_1; elseif (j <= 3e-128) tmp = Float64(t * Float64(b * i)); elseif (j <= 0.032) 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 = t * (x * -a); t_2 = a * (c * j); tmp = 0.0; if (j <= -8.8e+33) tmp = t_2; elseif (j <= -4.4e-146) tmp = t_1; elseif (j <= 3e-128) tmp = t * (b * i); elseif (j <= 0.032) 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[(t * N[(x * (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -8.8e+33], t$95$2, If[LessEqual[j, -4.4e-146], t$95$1, If[LessEqual[j, 3e-128], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 0.032], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(x \cdot \left(-a\right)\right)\\
t_2 := a \cdot \left(c \cdot j\right)\\
\mathbf{if}\;j \leq -8.8 \cdot 10^{+33}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -4.4 \cdot 10^{-146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq 3 \cdot 10^{-128}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;j \leq 0.032:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if j < -8.79999999999999975e33 or 0.032000000000000001 < j Initial program 74.5%
cancel-sign-sub74.5%
cancel-sign-sub-inv74.5%
*-commutative74.5%
remove-double-neg74.5%
*-commutative74.5%
Simplified74.5%
Taylor expanded in a around inf 52.1%
+-commutative52.1%
mul-1-neg52.1%
unsub-neg52.1%
*-commutative52.1%
Simplified52.1%
Taylor expanded in j around inf 47.4%
if -8.79999999999999975e33 < j < -4.4e-146 or 2.99999999999999978e-128 < j < 0.032000000000000001Initial program 75.4%
cancel-sign-sub75.4%
cancel-sign-sub-inv75.4%
*-commutative75.4%
remove-double-neg75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in t around inf 56.4%
distribute-lft-out--56.4%
associate-*r*56.4%
mul-1-neg56.4%
*-commutative56.4%
Simplified56.4%
Taylor expanded in a around inf 37.0%
*-commutative37.0%
associate-*l*40.1%
*-commutative40.1%
Simplified40.1%
if -4.4e-146 < j < 2.99999999999999978e-128Initial program 68.6%
cancel-sign-sub68.6%
cancel-sign-sub-inv68.6%
*-commutative68.6%
remove-double-neg68.6%
*-commutative68.6%
Simplified68.6%
add-cbrt-cube65.6%
Applied egg-rr65.6%
Taylor expanded in y around inf 58.6%
associate-*r*57.4%
*-commutative57.4%
associate-*l*60.2%
Simplified60.2%
Taylor expanded in t around inf 40.6%
*-commutative40.6%
associate-*l*40.9%
*-commutative40.9%
Simplified40.9%
Final simplification43.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* c (* z (- b)))))
(if (<= z -4e+190)
(* x (* y z))
(if (<= z -3100000.0)
t_1
(if (<= z -9.2e-219)
(* a (* c j))
(if (<= z 4.6e+87) (* t (* 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 = c * (z * -b);
double tmp;
if (z <= -4e+190) {
tmp = x * (y * z);
} else if (z <= -3100000.0) {
tmp = t_1;
} else if (z <= -9.2e-219) {
tmp = a * (c * j);
} else if (z <= 4.6e+87) {
tmp = t * (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 = c * (z * -b)
if (z <= (-4d+190)) then
tmp = x * (y * z)
else if (z <= (-3100000.0d0)) then
tmp = t_1
else if (z <= (-9.2d-219)) then
tmp = a * (c * j)
else if (z <= 4.6d+87) then
tmp = t * (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 = c * (z * -b);
double tmp;
if (z <= -4e+190) {
tmp = x * (y * z);
} else if (z <= -3100000.0) {
tmp = t_1;
} else if (z <= -9.2e-219) {
tmp = a * (c * j);
} else if (z <= 4.6e+87) {
tmp = t * (x * -a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = c * (z * -b) tmp = 0 if z <= -4e+190: tmp = x * (y * z) elif z <= -3100000.0: tmp = t_1 elif z <= -9.2e-219: tmp = a * (c * j) elif z <= 4.6e+87: tmp = t * (x * -a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(c * Float64(z * Float64(-b))) tmp = 0.0 if (z <= -4e+190) tmp = Float64(x * Float64(y * z)); elseif (z <= -3100000.0) tmp = t_1; elseif (z <= -9.2e-219) tmp = Float64(a * Float64(c * j)); elseif (z <= 4.6e+87) tmp = Float64(t * Float64(x * Float64(-a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = c * (z * -b); tmp = 0.0; if (z <= -4e+190) tmp = x * (y * z); elseif (z <= -3100000.0) tmp = t_1; elseif (z <= -9.2e-219) tmp = a * (c * j); elseif (z <= 4.6e+87) tmp = t * (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[(c * N[(z * (-b)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+190], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3100000.0], t$95$1, If[LessEqual[z, -9.2e-219], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+87], N[(t * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := c \cdot \left(z \cdot \left(-b\right)\right)\\
\mathbf{if}\;z \leq -4 \cdot 10^{+190}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -3100000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -9.2 \cdot 10^{-219}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+87}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.0000000000000003e190Initial program 79.0%
cancel-sign-sub79.0%
cancel-sign-sub-inv79.0%
*-commutative79.0%
remove-double-neg79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in z around inf 79.3%
Taylor expanded in y around inf 61.1%
associate-*r*66.2%
Simplified66.2%
if -4.0000000000000003e190 < z < -3.1e6 or 4.6000000000000003e87 < z Initial program 61.5%
cancel-sign-sub61.5%
cancel-sign-sub-inv61.5%
*-commutative61.5%
remove-double-neg61.5%
*-commutative61.5%
Simplified61.5%
Taylor expanded in y around 0 60.7%
Taylor expanded in z around inf 43.8%
associate-*r*43.8%
neg-mul-143.8%
Simplified43.8%
if -3.1e6 < z < -9.19999999999999954e-219Initial program 79.6%
cancel-sign-sub79.6%
cancel-sign-sub-inv79.6%
*-commutative79.6%
remove-double-neg79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in a around inf 58.6%
+-commutative58.6%
mul-1-neg58.6%
unsub-neg58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in j around inf 45.3%
if -9.19999999999999954e-219 < z < 4.6000000000000003e87Initial program 79.0%
cancel-sign-sub79.0%
cancel-sign-sub-inv79.0%
*-commutative79.0%
remove-double-neg79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in t around inf 61.7%
distribute-lft-out--61.7%
associate-*r*61.7%
mul-1-neg61.7%
*-commutative61.7%
Simplified61.7%
Taylor expanded in a around inf 29.7%
*-commutative29.7%
associate-*l*36.7%
*-commutative36.7%
Simplified36.7%
Final simplification45.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= z -1.22e+185)
(* x (* y z))
(if (<= z -6800000.0)
(* z (* b (- c)))
(if (<= z -1e-216)
(* a (* c j))
(if (<= z 4.8e+88) (* t (* x (- a))) (* c (* z (- b))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.22e+185) {
tmp = x * (y * z);
} else if (z <= -6800000.0) {
tmp = z * (b * -c);
} else if (z <= -1e-216) {
tmp = a * (c * j);
} else if (z <= 4.8e+88) {
tmp = t * (x * -a);
} else {
tmp = c * (z * -b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (z <= (-1.22d+185)) then
tmp = x * (y * z)
else if (z <= (-6800000.0d0)) then
tmp = z * (b * -c)
else if (z <= (-1d-216)) then
tmp = a * (c * j)
else if (z <= 4.8d+88) then
tmp = t * (x * -a)
else
tmp = c * (z * -b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (z <= -1.22e+185) {
tmp = x * (y * z);
} else if (z <= -6800000.0) {
tmp = z * (b * -c);
} else if (z <= -1e-216) {
tmp = a * (c * j);
} else if (z <= 4.8e+88) {
tmp = t * (x * -a);
} else {
tmp = c * (z * -b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if z <= -1.22e+185: tmp = x * (y * z) elif z <= -6800000.0: tmp = z * (b * -c) elif z <= -1e-216: tmp = a * (c * j) elif z <= 4.8e+88: tmp = t * (x * -a) else: tmp = c * (z * -b) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (z <= -1.22e+185) tmp = Float64(x * Float64(y * z)); elseif (z <= -6800000.0) tmp = Float64(z * Float64(b * Float64(-c))); elseif (z <= -1e-216) tmp = Float64(a * Float64(c * j)); elseif (z <= 4.8e+88) tmp = Float64(t * Float64(x * Float64(-a))); else tmp = Float64(c * Float64(z * Float64(-b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (z <= -1.22e+185) tmp = x * (y * z); elseif (z <= -6800000.0) tmp = z * (b * -c); elseif (z <= -1e-216) tmp = a * (c * j); elseif (z <= 4.8e+88) tmp = t * (x * -a); else tmp = c * (z * -b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[z, -1.22e+185], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6800000.0], N[(z * N[(b * (-c)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1e-216], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e+88], N[(t * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], N[(c * N[(z * (-b)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.22 \cdot 10^{+185}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq -6800000:\\
\;\;\;\;z \cdot \left(b \cdot \left(-c\right)\right)\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-216}:\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+88}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(z \cdot \left(-b\right)\right)\\
\end{array}
\end{array}
if z < -1.22000000000000002e185Initial program 79.0%
cancel-sign-sub79.0%
cancel-sign-sub-inv79.0%
*-commutative79.0%
remove-double-neg79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in z around inf 79.3%
Taylor expanded in y around inf 61.1%
associate-*r*66.2%
Simplified66.2%
if -1.22000000000000002e185 < z < -6.8e6Initial program 63.3%
cancel-sign-sub63.3%
cancel-sign-sub-inv63.3%
*-commutative63.3%
remove-double-neg63.3%
*-commutative63.3%
Simplified63.3%
Taylor expanded in z around inf 51.2%
Taylor expanded in y around 0 40.4%
neg-mul-140.4%
distribute-rgt-neg-in40.4%
Simplified40.4%
if -6.8e6 < z < -1e-216Initial program 79.6%
cancel-sign-sub79.6%
cancel-sign-sub-inv79.6%
*-commutative79.6%
remove-double-neg79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in a around inf 58.6%
+-commutative58.6%
mul-1-neg58.6%
unsub-neg58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in j around inf 45.3%
if -1e-216 < z < 4.7999999999999998e88Initial program 79.0%
cancel-sign-sub79.0%
cancel-sign-sub-inv79.0%
*-commutative79.0%
remove-double-neg79.0%
*-commutative79.0%
Simplified79.0%
Taylor expanded in t around inf 61.7%
distribute-lft-out--61.7%
associate-*r*61.7%
mul-1-neg61.7%
*-commutative61.7%
Simplified61.7%
Taylor expanded in a around inf 29.7%
*-commutative29.7%
associate-*l*36.7%
*-commutative36.7%
Simplified36.7%
if 4.7999999999999998e88 < z Initial program 59.4%
cancel-sign-sub59.4%
cancel-sign-sub-inv59.4%
*-commutative59.4%
remove-double-neg59.4%
*-commutative59.4%
Simplified59.4%
Taylor expanded in y around 0 59.6%
Taylor expanded in z around inf 47.7%
associate-*r*47.7%
neg-mul-147.7%
Simplified47.7%
Final simplification45.1%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= i -4.1e+139) (* t (* b i)) (if (<= i 3.8e+104) (* a (- (* c j) (* x t))) (* b (* t i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -4.1e+139) {
tmp = t * (b * i);
} else if (i <= 3.8e+104) {
tmp = a * ((c * j) - (x * t));
} 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 (i <= (-4.1d+139)) then
tmp = t * (b * i)
else if (i <= 3.8d+104) then
tmp = a * ((c * j) - (x * t))
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 (i <= -4.1e+139) {
tmp = t * (b * i);
} else if (i <= 3.8e+104) {
tmp = a * ((c * j) - (x * t));
} else {
tmp = b * (t * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -4.1e+139: tmp = t * (b * i) elif i <= 3.8e+104: tmp = a * ((c * j) - (x * t)) else: tmp = b * (t * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -4.1e+139) tmp = Float64(t * Float64(b * i)); elseif (i <= 3.8e+104) tmp = Float64(a * Float64(Float64(c * j) - Float64(x * t))); 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 (i <= -4.1e+139) tmp = t * (b * i); elseif (i <= 3.8e+104) tmp = a * ((c * j) - (x * t)); else tmp = b * (t * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -4.1e+139], N[(t * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.8e+104], N[(a * N[(N[(c * j), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(t * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4.1 \cdot 10^{+139}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;i \leq 3.8 \cdot 10^{+104}:\\
\;\;\;\;a \cdot \left(c \cdot j - x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(t \cdot i\right)\\
\end{array}
\end{array}
if i < -4.1000000000000002e139Initial program 57.7%
cancel-sign-sub57.7%
cancel-sign-sub-inv57.7%
*-commutative57.7%
remove-double-neg57.7%
*-commutative57.7%
Simplified57.7%
add-cbrt-cube49.1%
Applied egg-rr49.1%
Taylor expanded in y around inf 52.0%
associate-*r*49.1%
*-commutative49.1%
associate-*l*52.0%
Simplified52.0%
Taylor expanded in t around inf 49.6%
*-commutative49.6%
associate-*l*55.0%
*-commutative55.0%
Simplified55.0%
if -4.1000000000000002e139 < i < 3.79999999999999969e104Initial program 76.8%
cancel-sign-sub76.8%
cancel-sign-sub-inv76.8%
*-commutative76.8%
remove-double-neg76.8%
*-commutative76.8%
Simplified76.8%
Taylor expanded in a around inf 51.7%
+-commutative51.7%
mul-1-neg51.7%
unsub-neg51.7%
*-commutative51.7%
Simplified51.7%
if 3.79999999999999969e104 < i Initial program 70.0%
cancel-sign-sub70.0%
cancel-sign-sub-inv70.0%
*-commutative70.0%
remove-double-neg70.0%
*-commutative70.0%
Simplified70.0%
Taylor expanded in b around inf 65.6%
Taylor expanded in i around inf 53.7%
Final simplification52.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= j -1.6e+26) (not (<= j 4.8e-104))) (* a (* c j)) (* i (* t b))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((j <= -1.6e+26) || !(j <= 4.8e-104)) {
tmp = a * (c * j);
} else {
tmp = i * (t * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((j <= (-1.6d+26)) .or. (.not. (j <= 4.8d-104))) then
tmp = a * (c * j)
else
tmp = i * (t * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((j <= -1.6e+26) || !(j <= 4.8e-104)) {
tmp = a * (c * j);
} else {
tmp = i * (t * b);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (j <= -1.6e+26) or not (j <= 4.8e-104): tmp = a * (c * j) else: tmp = i * (t * b) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((j <= -1.6e+26) || !(j <= 4.8e-104)) tmp = Float64(a * Float64(c * j)); else tmp = Float64(i * Float64(t * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((j <= -1.6e+26) || ~((j <= 4.8e-104))) tmp = a * (c * j); else tmp = i * (t * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[j, -1.6e+26], N[Not[LessEqual[j, 4.8e-104]], $MachinePrecision]], N[(a * N[(c * j), $MachinePrecision]), $MachinePrecision], N[(i * N[(t * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.6 \cdot 10^{+26} \lor \neg \left(j \leq 4.8 \cdot 10^{-104}\right):\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(t \cdot b\right)\\
\end{array}
\end{array}
if j < -1.60000000000000014e26 or 4.8000000000000001e-104 < j Initial program 75.5%
cancel-sign-sub75.5%
cancel-sign-sub-inv75.5%
*-commutative75.5%
remove-double-neg75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in a around inf 52.3%
+-commutative52.3%
mul-1-neg52.3%
unsub-neg52.3%
*-commutative52.3%
Simplified52.3%
Taylor expanded in j around inf 44.4%
if -1.60000000000000014e26 < j < 4.8000000000000001e-104Initial program 69.9%
cancel-sign-sub69.9%
cancel-sign-sub-inv69.9%
*-commutative69.9%
remove-double-neg69.9%
*-commutative69.9%
Simplified69.9%
Taylor expanded in y around 0 69.4%
Taylor expanded in i around inf 33.0%
Final simplification39.6%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= j -4.2e+26) (not (<= j 5.8e-94))) (* 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 <= -4.2e+26) || !(j <= 5.8e-94)) {
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 <= (-4.2d+26)) .or. (.not. (j <= 5.8d-94))) 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 <= -4.2e+26) || !(j <= 5.8e-94)) {
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 <= -4.2e+26) or not (j <= 5.8e-94): 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 <= -4.2e+26) || !(j <= 5.8e-94)) 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 <= -4.2e+26) || ~((j <= 5.8e-94))) 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, -4.2e+26], N[Not[LessEqual[j, 5.8e-94]], $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 -4.2 \cdot 10^{+26} \lor \neg \left(j \leq 5.8 \cdot 10^{-94}\right):\\
\;\;\;\;a \cdot \left(c \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b \cdot i\right)\\
\end{array}
\end{array}
if j < -4.2000000000000002e26 or 5.79999999999999991e-94 < j Initial program 75.5%
cancel-sign-sub75.5%
cancel-sign-sub-inv75.5%
*-commutative75.5%
remove-double-neg75.5%
*-commutative75.5%
Simplified75.5%
Taylor expanded in a around inf 52.3%
+-commutative52.3%
mul-1-neg52.3%
unsub-neg52.3%
*-commutative52.3%
Simplified52.3%
Taylor expanded in j around inf 44.4%
if -4.2000000000000002e26 < j < 5.79999999999999991e-94Initial program 69.9%
cancel-sign-sub69.9%
cancel-sign-sub-inv69.9%
*-commutative69.9%
remove-double-neg69.9%
*-commutative69.9%
Simplified69.9%
add-cbrt-cube61.8%
Applied egg-rr61.8%
Taylor expanded in y around inf 52.7%
associate-*r*50.1%
*-commutative50.1%
associate-*l*53.7%
Simplified53.7%
Taylor expanded in t around inf 33.0%
*-commutative33.0%
associate-*l*34.1%
*-commutative34.1%
Simplified34.1%
Final simplification40.0%
(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.1%
cancel-sign-sub73.1%
cancel-sign-sub-inv73.1%
*-commutative73.1%
remove-double-neg73.1%
*-commutative73.1%
Simplified73.1%
Taylor expanded in a around inf 45.6%
+-commutative45.6%
mul-1-neg45.6%
unsub-neg45.6%
*-commutative45.6%
Simplified45.6%
Taylor expanded in j around inf 29.3%
Final simplification29.3%
(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 2023229
(FPCore (x y z t a b c i j)
:name "Data.Colour.Matrix:determinant from colour-2.3.3, A"
:precision binary64
:herbie-target
(if (< x -1.469694296777705e-64) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i)))) (if (< x 3.2113527362226803e-147) (- (* (- (* b i) (* x a)) t) (- (* z (* c b)) (* j (- (* c a) (* y i))))) (+ (- (* x (- (* y z) (* t a))) (/ (* b (- (pow (* c z) 2.0) (pow (* t i) 2.0))) (+ (* c z) (* t i)))) (* j (- (* c a) (* y i))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* t i)))) (* j (- (* c a) (* y i)))))