
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i j) :precision binary64 (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)));
}
def code(x, y, z, t, a, b, c, i, j): return ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y)))
function code(x, y, z, t, a, b, c, i, j) return Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(j * Float64(Float64(c * t) - Float64(i * y)))) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + (j * ((c * t) - (i * y))); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(c * t), $MachinePrecision] - N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)
\end{array}
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (- (* t c) (* y i))))
(if (<=
(+ (- (* x (- (* y z) (* t a))) (* b (- (* z c) (* a i)))) (* j t_1))
INFINITY)
(fma j t_1 (+ (* x (fma y z (* t (- a)))) (* b (- (* a i) (* z c)))))
(* a (- (* b i) (* x t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = (t * c) - (y * i);
double tmp;
if ((((x * ((y * z) - (t * a))) - (b * ((z * c) - (a * i)))) + (j * t_1)) <= ((double) INFINITY)) {
tmp = fma(j, t_1, ((x * fma(y, z, (t * -a))) + (b * ((a * i) - (z * c)))));
} else {
tmp = a * ((b * i) - (x * t));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(t * c) - Float64(y * i)) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(z * c) - Float64(a * i)))) + Float64(j * t_1)) <= Inf) tmp = fma(j, t_1, Float64(Float64(x * fma(y, z, Float64(t * Float64(-a)))) + Float64(b * Float64(Float64(a * i) - Float64(z * c))))); else tmp = Float64(a * Float64(Float64(b * i) - Float64(x * t))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * t$95$1), $MachinePrecision]), $MachinePrecision], Infinity], N[(j * t$95$1 + N[(N[(x * N[(y * z + N[(t * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(b * i), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot c - y \cdot i\\
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - a \cdot i\right)\right) + j \cdot t\_1 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(j, t\_1, x \cdot \mathsf{fma}\left(y, z, t \cdot \left(-a\right)\right) + b \cdot \left(a \cdot i - z \cdot c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot i - x \cdot t\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 95.1%
+-commutative95.1%
fma-define95.1%
*-commutative95.1%
*-commutative95.1%
cancel-sign-sub-inv95.1%
cancel-sign-sub95.1%
sub-neg95.1%
sub-neg95.1%
*-commutative95.1%
fma-neg95.1%
*-commutative95.1%
distribute-rgt-neg-out95.1%
remove-double-neg95.1%
*-commutative95.1%
*-commutative95.1%
Simplified95.1%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in a around inf 55.7%
distribute-lft-out--55.7%
Simplified55.7%
Final simplification86.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* z c) (* a i))))
(* j (- (* t c) (* y i))))))
(if (<= t_1 INFINITY) t_1 (* a (- (* b i) (* x t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((z * c) - (a * i)))) + (j * ((t * c) - (y * i)));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = a * ((b * i) - (x * t));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((z * c) - (a * i)))) + (j * ((t * c) - (y * i)));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = a * ((b * i) - (x * t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((z * c) - (a * i)))) + (j * ((t * c) - (y * i))) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = a * ((b * i) - (x * t)) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(z * c) - Float64(a * i)))) + Float64(j * Float64(Float64(t * c) - Float64(y * i)))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(a * Float64(Float64(b * i) - Float64(x * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((x * ((y * z) - (t * a))) - (b * ((z * c) - (a * i)))) + (j * ((t * c) - (y * i))); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = a * ((b * i) - (x * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * N[(N[(b * i), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(z \cdot c - a \cdot i\right)\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot i - x \cdot t\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) < +inf.0Initial program 95.1%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in a around inf 55.7%
distribute-lft-out--55.7%
Simplified55.7%
Final simplification86.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* z c)))) (t_2 (* t (- (* c j) (* x a)))))
(if (<= t -1.6e+19)
t_2
(if (<= t -4.2e-274)
t_1
(if (<= t -1.05e-286)
(* j (- (* t c) (* y i)))
(if (<= t 1.05e-193)
t_1
(if (<= t 1.25e-111)
(* i (- (* a b) (* y j)))
(if (<= t 2.6e+112) (* c (- (* t j) (* z b))) 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 * ((a * i) - (z * c));
double t_2 = t * ((c * j) - (x * a));
double tmp;
if (t <= -1.6e+19) {
tmp = t_2;
} else if (t <= -4.2e-274) {
tmp = t_1;
} else if (t <= -1.05e-286) {
tmp = j * ((t * c) - (y * i));
} else if (t <= 1.05e-193) {
tmp = t_1;
} else if (t <= 1.25e-111) {
tmp = i * ((a * b) - (y * j));
} else if (t <= 2.6e+112) {
tmp = c * ((t * j) - (z * b));
} 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 * ((a * i) - (z * c))
t_2 = t * ((c * j) - (x * a))
if (t <= (-1.6d+19)) then
tmp = t_2
else if (t <= (-4.2d-274)) then
tmp = t_1
else if (t <= (-1.05d-286)) then
tmp = j * ((t * c) - (y * i))
else if (t <= 1.05d-193) then
tmp = t_1
else if (t <= 1.25d-111) then
tmp = i * ((a * b) - (y * j))
else if (t <= 2.6d+112) then
tmp = c * ((t * j) - (z * b))
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 * ((a * i) - (z * c));
double t_2 = t * ((c * j) - (x * a));
double tmp;
if (t <= -1.6e+19) {
tmp = t_2;
} else if (t <= -4.2e-274) {
tmp = t_1;
} else if (t <= -1.05e-286) {
tmp = j * ((t * c) - (y * i));
} else if (t <= 1.05e-193) {
tmp = t_1;
} else if (t <= 1.25e-111) {
tmp = i * ((a * b) - (y * j));
} else if (t <= 2.6e+112) {
tmp = c * ((t * j) - (z * b));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((a * i) - (z * c)) t_2 = t * ((c * j) - (x * a)) tmp = 0 if t <= -1.6e+19: tmp = t_2 elif t <= -4.2e-274: tmp = t_1 elif t <= -1.05e-286: tmp = j * ((t * c) - (y * i)) elif t <= 1.05e-193: tmp = t_1 elif t <= 1.25e-111: tmp = i * ((a * b) - (y * j)) elif t <= 2.6e+112: tmp = c * ((t * j) - (z * b)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(a * i) - Float64(z * c))) t_2 = Float64(t * Float64(Float64(c * j) - Float64(x * a))) tmp = 0.0 if (t <= -1.6e+19) tmp = t_2; elseif (t <= -4.2e-274) tmp = t_1; elseif (t <= -1.05e-286) tmp = Float64(j * Float64(Float64(t * c) - Float64(y * i))); elseif (t <= 1.05e-193) tmp = t_1; elseif (t <= 1.25e-111) tmp = Float64(i * Float64(Float64(a * b) - Float64(y * j))); elseif (t <= 2.6e+112) tmp = Float64(c * Float64(Float64(t * j) - Float64(z * b))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((a * i) - (z * c)); t_2 = t * ((c * j) - (x * a)); tmp = 0.0; if (t <= -1.6e+19) tmp = t_2; elseif (t <= -4.2e-274) tmp = t_1; elseif (t <= -1.05e-286) tmp = j * ((t * c) - (y * i)); elseif (t <= 1.05e-193) tmp = t_1; elseif (t <= 1.25e-111) tmp = i * ((a * b) - (y * j)); elseif (t <= 2.6e+112) tmp = c * ((t * j) - (z * b)); 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[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(c * j), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+19], t$95$2, If[LessEqual[t, -4.2e-274], t$95$1, If[LessEqual[t, -1.05e-286], N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e-193], t$95$1, If[LessEqual[t, 1.25e-111], N[(i * N[(N[(a * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+112], N[(c * N[(N[(t * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - z \cdot c\right)\\
t_2 := t \cdot \left(c \cdot j - x \cdot a\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+19}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-286}:\\
\;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-111}:\\
\;\;\;\;i \cdot \left(a \cdot b - y \cdot j\right)\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+112}:\\
\;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.6e19 or 2.6000000000000001e112 < t Initial program 67.6%
Taylor expanded in t around inf 68.8%
+-commutative68.8%
mul-1-neg68.8%
unsub-neg68.8%
Simplified68.8%
if -1.6e19 < t < -4.19999999999999988e-274 or -1.04999999999999994e-286 < t < 1.05e-193Initial program 80.4%
Taylor expanded in b around inf 65.5%
if -4.19999999999999988e-274 < t < -1.04999999999999994e-286Initial program 80.0%
Taylor expanded in j around inf 100.0%
if 1.05e-193 < t < 1.2500000000000001e-111Initial program 70.5%
+-commutative70.5%
fma-define70.6%
*-commutative70.6%
*-commutative70.6%
cancel-sign-sub-inv70.6%
cancel-sign-sub70.6%
sub-neg70.6%
sub-neg70.6%
*-commutative70.6%
fma-neg70.6%
*-commutative70.6%
distribute-rgt-neg-out70.6%
remove-double-neg70.6%
*-commutative70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in x around inf 70.6%
+-commutative70.6%
mul-1-neg70.6%
unsub-neg70.6%
+-commutative70.6%
mul-1-neg70.6%
unsub-neg70.6%
*-commutative70.6%
associate-/l*78.2%
Simplified78.2%
Taylor expanded in i around inf 66.8%
+-commutative66.8%
mul-1-neg66.8%
unsub-neg66.8%
*-commutative66.8%
*-commutative66.8%
Simplified66.8%
if 1.2500000000000001e-111 < t < 2.6000000000000001e112Initial program 80.9%
Taylor expanded in c around inf 55.9%
Final simplification66.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (- (* c j) (* x a)))))
(if (<= t -3.4e+19)
t_1
(if (<= t -2.5e-274)
(* b (* a (- i (* c (/ z a)))))
(if (<= t -1.1e-286)
(* j (- (* t c) (* y i)))
(if (<= t 8.8e-197)
(* b (- (* a i) (* z c)))
(if (<= t 9.6e-110)
(* i (- (* a b) (* y j)))
(if (<= t 2.5e+112) (* c (- (* t j) (* z 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 = t * ((c * j) - (x * a));
double tmp;
if (t <= -3.4e+19) {
tmp = t_1;
} else if (t <= -2.5e-274) {
tmp = b * (a * (i - (c * (z / a))));
} else if (t <= -1.1e-286) {
tmp = j * ((t * c) - (y * i));
} else if (t <= 8.8e-197) {
tmp = b * ((a * i) - (z * c));
} else if (t <= 9.6e-110) {
tmp = i * ((a * b) - (y * j));
} else if (t <= 2.5e+112) {
tmp = c * ((t * j) - (z * 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 = t * ((c * j) - (x * a))
if (t <= (-3.4d+19)) then
tmp = t_1
else if (t <= (-2.5d-274)) then
tmp = b * (a * (i - (c * (z / a))))
else if (t <= (-1.1d-286)) then
tmp = j * ((t * c) - (y * i))
else if (t <= 8.8d-197) then
tmp = b * ((a * i) - (z * c))
else if (t <= 9.6d-110) then
tmp = i * ((a * b) - (y * j))
else if (t <= 2.5d+112) then
tmp = c * ((t * j) - (z * 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 = t * ((c * j) - (x * a));
double tmp;
if (t <= -3.4e+19) {
tmp = t_1;
} else if (t <= -2.5e-274) {
tmp = b * (a * (i - (c * (z / a))));
} else if (t <= -1.1e-286) {
tmp = j * ((t * c) - (y * i));
} else if (t <= 8.8e-197) {
tmp = b * ((a * i) - (z * c));
} else if (t <= 9.6e-110) {
tmp = i * ((a * b) - (y * j));
} else if (t <= 2.5e+112) {
tmp = c * ((t * j) - (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = t * ((c * j) - (x * a)) tmp = 0 if t <= -3.4e+19: tmp = t_1 elif t <= -2.5e-274: tmp = b * (a * (i - (c * (z / a)))) elif t <= -1.1e-286: tmp = j * ((t * c) - (y * i)) elif t <= 8.8e-197: tmp = b * ((a * i) - (z * c)) elif t <= 9.6e-110: tmp = i * ((a * b) - (y * j)) elif t <= 2.5e+112: tmp = c * ((t * j) - (z * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(t * Float64(Float64(c * j) - Float64(x * a))) tmp = 0.0 if (t <= -3.4e+19) tmp = t_1; elseif (t <= -2.5e-274) tmp = Float64(b * Float64(a * Float64(i - Float64(c * Float64(z / a))))); elseif (t <= -1.1e-286) tmp = Float64(j * Float64(Float64(t * c) - Float64(y * i))); elseif (t <= 8.8e-197) tmp = Float64(b * Float64(Float64(a * i) - Float64(z * c))); elseif (t <= 9.6e-110) tmp = Float64(i * Float64(Float64(a * b) - Float64(y * j))); elseif (t <= 2.5e+112) tmp = Float64(c * Float64(Float64(t * j) - Float64(z * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = t * ((c * j) - (x * a)); tmp = 0.0; if (t <= -3.4e+19) tmp = t_1; elseif (t <= -2.5e-274) tmp = b * (a * (i - (c * (z / a)))); elseif (t <= -1.1e-286) tmp = j * ((t * c) - (y * i)); elseif (t <= 8.8e-197) tmp = b * ((a * i) - (z * c)); elseif (t <= 9.6e-110) tmp = i * ((a * b) - (y * j)); elseif (t <= 2.5e+112) tmp = c * ((t * j) - (z * 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[(t * N[(N[(c * j), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+19], t$95$1, If[LessEqual[t, -2.5e-274], N[(b * N[(a * N[(i - N[(c * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.1e-286], N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e-197], N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.6e-110], N[(i * N[(N[(a * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e+112], N[(c * N[(N[(t * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(c \cdot j - x \cdot a\right)\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-274}:\\
\;\;\;\;b \cdot \left(a \cdot \left(i - c \cdot \frac{z}{a}\right)\right)\\
\mathbf{elif}\;t \leq -1.1 \cdot 10^{-286}:\\
\;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-197}:\\
\;\;\;\;b \cdot \left(a \cdot i - z \cdot c\right)\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-110}:\\
\;\;\;\;i \cdot \left(a \cdot b - y \cdot j\right)\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{+112}:\\
\;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.4e19 or 2.5e112 < t Initial program 67.6%
Taylor expanded in t around inf 68.8%
+-commutative68.8%
mul-1-neg68.8%
unsub-neg68.8%
Simplified68.8%
if -3.4e19 < t < -2.5e-274Initial program 77.6%
Taylor expanded in b around inf 62.5%
Taylor expanded in a around inf 62.5%
mul-1-neg62.5%
unsub-neg62.5%
associate-/l*62.6%
Simplified62.6%
if -2.5e-274 < t < -1.1e-286Initial program 80.0%
Taylor expanded in j around inf 100.0%
if -1.1e-286 < t < 8.8000000000000001e-197Initial program 85.8%
Taylor expanded in b around inf 71.2%
if 8.8000000000000001e-197 < t < 9.60000000000000026e-110Initial program 70.5%
+-commutative70.5%
fma-define70.6%
*-commutative70.6%
*-commutative70.6%
cancel-sign-sub-inv70.6%
cancel-sign-sub70.6%
sub-neg70.6%
sub-neg70.6%
*-commutative70.6%
fma-neg70.6%
*-commutative70.6%
distribute-rgt-neg-out70.6%
remove-double-neg70.6%
*-commutative70.6%
*-commutative70.6%
Simplified70.6%
Taylor expanded in x around inf 70.6%
+-commutative70.6%
mul-1-neg70.6%
unsub-neg70.6%
+-commutative70.6%
mul-1-neg70.6%
unsub-neg70.6%
*-commutative70.6%
associate-/l*78.2%
Simplified78.2%
Taylor expanded in i around inf 66.8%
+-commutative66.8%
mul-1-neg66.8%
unsub-neg66.8%
*-commutative66.8%
*-commutative66.8%
Simplified66.8%
if 9.60000000000000026e-110 < t < 2.5e112Initial program 80.9%
Taylor expanded in c around inf 55.9%
Final simplification66.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (* z (- c)))))
(if (<= i -4.6e+61)
(* a (* b i))
(if (<= i -5e-74)
(* t (* x (- a)))
(if (<= i -1.3e-215)
(* c (* t j))
(if (<= i 1.7e-246)
t_1
(if (<= i 1.65e-99)
(* t (* c j))
(if (<= i 2050000000000.0) t_1 (* b (* a i))))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * (z * -c);
double tmp;
if (i <= -4.6e+61) {
tmp = a * (b * i);
} else if (i <= -5e-74) {
tmp = t * (x * -a);
} else if (i <= -1.3e-215) {
tmp = c * (t * j);
} else if (i <= 1.7e-246) {
tmp = t_1;
} else if (i <= 1.65e-99) {
tmp = t * (c * j);
} else if (i <= 2050000000000.0) {
tmp = t_1;
} else {
tmp = b * (a * 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) :: t_1
real(8) :: tmp
t_1 = b * (z * -c)
if (i <= (-4.6d+61)) then
tmp = a * (b * i)
else if (i <= (-5d-74)) then
tmp = t * (x * -a)
else if (i <= (-1.3d-215)) then
tmp = c * (t * j)
else if (i <= 1.7d-246) then
tmp = t_1
else if (i <= 1.65d-99) then
tmp = t * (c * j)
else if (i <= 2050000000000.0d0) then
tmp = t_1
else
tmp = b * (a * 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 t_1 = b * (z * -c);
double tmp;
if (i <= -4.6e+61) {
tmp = a * (b * i);
} else if (i <= -5e-74) {
tmp = t * (x * -a);
} else if (i <= -1.3e-215) {
tmp = c * (t * j);
} else if (i <= 1.7e-246) {
tmp = t_1;
} else if (i <= 1.65e-99) {
tmp = t * (c * j);
} else if (i <= 2050000000000.0) {
tmp = t_1;
} else {
tmp = b * (a * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * (z * -c) tmp = 0 if i <= -4.6e+61: tmp = a * (b * i) elif i <= -5e-74: tmp = t * (x * -a) elif i <= -1.3e-215: tmp = c * (t * j) elif i <= 1.7e-246: tmp = t_1 elif i <= 1.65e-99: tmp = t * (c * j) elif i <= 2050000000000.0: tmp = t_1 else: tmp = b * (a * i) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(z * Float64(-c))) tmp = 0.0 if (i <= -4.6e+61) tmp = Float64(a * Float64(b * i)); elseif (i <= -5e-74) tmp = Float64(t * Float64(x * Float64(-a))); elseif (i <= -1.3e-215) tmp = Float64(c * Float64(t * j)); elseif (i <= 1.7e-246) tmp = t_1; elseif (i <= 1.65e-99) tmp = Float64(t * Float64(c * j)); elseif (i <= 2050000000000.0) tmp = t_1; else tmp = Float64(b * Float64(a * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * (z * -c); tmp = 0.0; if (i <= -4.6e+61) tmp = a * (b * i); elseif (i <= -5e-74) tmp = t * (x * -a); elseif (i <= -1.3e-215) tmp = c * (t * j); elseif (i <= 1.7e-246) tmp = t_1; elseif (i <= 1.65e-99) tmp = t * (c * j); elseif (i <= 2050000000000.0) tmp = t_1; else tmp = b * (a * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(z * (-c)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -4.6e+61], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -5e-74], N[(t * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, -1.3e-215], N[(c * N[(t * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.7e-246], t$95$1, If[LessEqual[i, 1.65e-99], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2050000000000.0], t$95$1, N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(z \cdot \left(-c\right)\right)\\
\mathbf{if}\;i \leq -4.6 \cdot 10^{+61}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;i \leq -5 \cdot 10^{-74}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;i \leq -1.3 \cdot 10^{-215}:\\
\;\;\;\;c \cdot \left(t \cdot j\right)\\
\mathbf{elif}\;i \leq 1.7 \cdot 10^{-246}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 1.65 \cdot 10^{-99}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;i \leq 2050000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\end{array}
\end{array}
if i < -4.5999999999999999e61Initial program 59.5%
Taylor expanded in b around inf 59.9%
Taylor expanded in a around inf 47.6%
Taylor expanded in b around 0 55.0%
*-commutative55.0%
Simplified55.0%
if -4.5999999999999999e61 < i < -4.99999999999999998e-74Initial program 84.1%
Taylor expanded in t around inf 48.5%
+-commutative48.5%
mul-1-neg48.5%
unsub-neg48.5%
Simplified48.5%
Taylor expanded in c around 0 39.4%
mul-1-neg39.4%
distribute-lft-neg-out39.4%
*-commutative39.4%
Simplified39.4%
if -4.99999999999999998e-74 < i < -1.3e-215Initial program 81.8%
Taylor expanded in t around inf 38.3%
+-commutative38.3%
mul-1-neg38.3%
unsub-neg38.3%
Simplified38.3%
Taylor expanded in c around inf 42.2%
if -1.3e-215 < i < 1.7000000000000001e-246 or 1.64999999999999993e-99 < i < 2.05e12Initial program 83.4%
Taylor expanded in b around inf 47.1%
Taylor expanded in a around 0 41.9%
mul-1-neg41.9%
distribute-lft-neg-out41.9%
*-commutative41.9%
Simplified41.9%
if 1.7000000000000001e-246 < i < 1.64999999999999993e-99Initial program 87.5%
Taylor expanded in t around inf 69.3%
+-commutative69.3%
mul-1-neg69.3%
unsub-neg69.3%
Simplified69.3%
Taylor expanded in c around inf 47.1%
if 2.05e12 < i Initial program 60.2%
Taylor expanded in b around inf 53.5%
Taylor expanded in a around inf 48.9%
Final simplification46.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (* z (- c)))))
(if (<= i -4600000000000.0)
(* a (* b i))
(if (<= i 2.3e-245)
t_1
(if (<= i 2.6e-98)
(* t (* c j))
(if (<= i 7.6e+14) t_1 (* b (* a i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * (z * -c);
double tmp;
if (i <= -4600000000000.0) {
tmp = a * (b * i);
} else if (i <= 2.3e-245) {
tmp = t_1;
} else if (i <= 2.6e-98) {
tmp = t * (c * j);
} else if (i <= 7.6e+14) {
tmp = t_1;
} else {
tmp = b * (a * 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) :: t_1
real(8) :: tmp
t_1 = b * (z * -c)
if (i <= (-4600000000000.0d0)) then
tmp = a * (b * i)
else if (i <= 2.3d-245) then
tmp = t_1
else if (i <= 2.6d-98) then
tmp = t * (c * j)
else if (i <= 7.6d+14) then
tmp = t_1
else
tmp = b * (a * 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 t_1 = b * (z * -c);
double tmp;
if (i <= -4600000000000.0) {
tmp = a * (b * i);
} else if (i <= 2.3e-245) {
tmp = t_1;
} else if (i <= 2.6e-98) {
tmp = t * (c * j);
} else if (i <= 7.6e+14) {
tmp = t_1;
} else {
tmp = b * (a * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * (z * -c) tmp = 0 if i <= -4600000000000.0: tmp = a * (b * i) elif i <= 2.3e-245: tmp = t_1 elif i <= 2.6e-98: tmp = t * (c * j) elif i <= 7.6e+14: tmp = t_1 else: tmp = b * (a * i) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(z * Float64(-c))) tmp = 0.0 if (i <= -4600000000000.0) tmp = Float64(a * Float64(b * i)); elseif (i <= 2.3e-245) tmp = t_1; elseif (i <= 2.6e-98) tmp = Float64(t * Float64(c * j)); elseif (i <= 7.6e+14) tmp = t_1; else tmp = Float64(b * Float64(a * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * (z * -c); tmp = 0.0; if (i <= -4600000000000.0) tmp = a * (b * i); elseif (i <= 2.3e-245) tmp = t_1; elseif (i <= 2.6e-98) tmp = t * (c * j); elseif (i <= 7.6e+14) tmp = t_1; else tmp = b * (a * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(z * (-c)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -4600000000000.0], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.3e-245], t$95$1, If[LessEqual[i, 2.6e-98], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 7.6e+14], t$95$1, N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(z \cdot \left(-c\right)\right)\\
\mathbf{if}\;i \leq -4600000000000:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;i \leq 2.3 \cdot 10^{-245}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 2.6 \cdot 10^{-98}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;i \leq 7.6 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\end{array}
\end{array}
if i < -4.6e12Initial program 66.4%
Taylor expanded in b around inf 54.9%
Taylor expanded in a around inf 41.6%
Taylor expanded in b around 0 47.3%
*-commutative47.3%
Simplified47.3%
if -4.6e12 < i < 2.3000000000000002e-245 or 2.60000000000000013e-98 < i < 7.6e14Initial program 82.5%
Taylor expanded in b around inf 43.7%
Taylor expanded in a around 0 39.0%
mul-1-neg39.0%
distribute-lft-neg-out39.0%
*-commutative39.0%
Simplified39.0%
if 2.3000000000000002e-245 < i < 2.60000000000000013e-98Initial program 87.5%
Taylor expanded in t around inf 69.3%
+-commutative69.3%
mul-1-neg69.3%
unsub-neg69.3%
Simplified69.3%
Taylor expanded in c around inf 47.1%
if 7.6e14 < i Initial program 60.2%
Taylor expanded in b around inf 53.5%
Taylor expanded in a around inf 48.9%
Final simplification44.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* x (* y z))))
(if (<= i -1.15e+19)
(* a (* b i))
(if (<= i 6.6e-279)
t_1
(if (<= i 3.1e-93)
(* t (* c j))
(if (<= i 1.2e-5) t_1 (* b (* a i))))))))
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 (i <= -1.15e+19) {
tmp = a * (b * i);
} else if (i <= 6.6e-279) {
tmp = t_1;
} else if (i <= 3.1e-93) {
tmp = t * (c * j);
} else if (i <= 1.2e-5) {
tmp = t_1;
} else {
tmp = b * (a * 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) :: t_1
real(8) :: tmp
t_1 = x * (y * z)
if (i <= (-1.15d+19)) then
tmp = a * (b * i)
else if (i <= 6.6d-279) then
tmp = t_1
else if (i <= 3.1d-93) then
tmp = t * (c * j)
else if (i <= 1.2d-5) then
tmp = t_1
else
tmp = b * (a * 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 t_1 = x * (y * z);
double tmp;
if (i <= -1.15e+19) {
tmp = a * (b * i);
} else if (i <= 6.6e-279) {
tmp = t_1;
} else if (i <= 3.1e-93) {
tmp = t * (c * j);
} else if (i <= 1.2e-5) {
tmp = t_1;
} else {
tmp = b * (a * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = x * (y * z) tmp = 0 if i <= -1.15e+19: tmp = a * (b * i) elif i <= 6.6e-279: tmp = t_1 elif i <= 3.1e-93: tmp = t * (c * j) elif i <= 1.2e-5: tmp = t_1 else: tmp = b * (a * i) return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(x * Float64(y * z)) tmp = 0.0 if (i <= -1.15e+19) tmp = Float64(a * Float64(b * i)); elseif (i <= 6.6e-279) tmp = t_1; elseif (i <= 3.1e-93) tmp = Float64(t * Float64(c * j)); elseif (i <= 1.2e-5) tmp = t_1; else tmp = Float64(b * Float64(a * i)); 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 (i <= -1.15e+19) tmp = a * (b * i); elseif (i <= 6.6e-279) tmp = t_1; elseif (i <= 3.1e-93) tmp = t * (c * j); elseif (i <= 1.2e-5) tmp = t_1; else tmp = b * (a * i); 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[i, -1.15e+19], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 6.6e-279], t$95$1, If[LessEqual[i, 3.1e-93], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.2e-5], t$95$1, N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot z\right)\\
\mathbf{if}\;i \leq -1.15 \cdot 10^{+19}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;i \leq 6.6 \cdot 10^{-279}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 3.1 \cdot 10^{-93}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;i \leq 1.2 \cdot 10^{-5}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\end{array}
\end{array}
if i < -1.15e19Initial program 65.7%
Taylor expanded in b around inf 55.9%
Taylor expanded in a around inf 42.4%
Taylor expanded in b around 0 48.2%
*-commutative48.2%
Simplified48.2%
if -1.15e19 < i < 6.6e-279 or 3.1e-93 < i < 1.2e-5Initial program 81.8%
Taylor expanded in x around inf 45.9%
*-commutative45.9%
Simplified45.9%
Taylor expanded in z around inf 25.3%
*-commutative25.3%
Simplified25.3%
if 6.6e-279 < i < 3.1e-93Initial program 87.8%
Taylor expanded in t around inf 63.0%
+-commutative63.0%
mul-1-neg63.0%
unsub-neg63.0%
Simplified63.0%
Taylor expanded in c around inf 42.9%
if 1.2e-5 < i Initial program 60.8%
Taylor expanded in b around inf 54.2%
Taylor expanded in a around inf 48.2%
Final simplification39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= i -1.2e+20)
(* a (* b i))
(if (<= i 5e-278)
(* x (* y z))
(if (<= i 1e-96)
(* t (* c j))
(if (<= i 1.4) (* y (* x z)) (* b (* a i)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.2e+20) {
tmp = a * (b * i);
} else if (i <= 5e-278) {
tmp = x * (y * z);
} else if (i <= 1e-96) {
tmp = t * (c * j);
} else if (i <= 1.4) {
tmp = y * (x * z);
} else {
tmp = b * (a * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (i <= (-1.2d+20)) then
tmp = a * (b * i)
else if (i <= 5d-278) then
tmp = x * (y * z)
else if (i <= 1d-96) then
tmp = t * (c * j)
else if (i <= 1.4d0) then
tmp = y * (x * z)
else
tmp = b * (a * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.2e+20) {
tmp = a * (b * i);
} else if (i <= 5e-278) {
tmp = x * (y * z);
} else if (i <= 1e-96) {
tmp = t * (c * j);
} else if (i <= 1.4) {
tmp = y * (x * z);
} else {
tmp = b * (a * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -1.2e+20: tmp = a * (b * i) elif i <= 5e-278: tmp = x * (y * z) elif i <= 1e-96: tmp = t * (c * j) elif i <= 1.4: tmp = y * (x * z) else: tmp = b * (a * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -1.2e+20) tmp = Float64(a * Float64(b * i)); elseif (i <= 5e-278) tmp = Float64(x * Float64(y * z)); elseif (i <= 1e-96) tmp = Float64(t * Float64(c * j)); elseif (i <= 1.4) tmp = Float64(y * Float64(x * z)); else tmp = Float64(b * Float64(a * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -1.2e+20) tmp = a * (b * i); elseif (i <= 5e-278) tmp = x * (y * z); elseif (i <= 1e-96) tmp = t * (c * j); elseif (i <= 1.4) tmp = y * (x * z); else tmp = b * (a * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -1.2e+20], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 5e-278], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1e-96], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.4], N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.2 \cdot 10^{+20}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;i \leq 5 \cdot 10^{-278}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;i \leq 10^{-96}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\mathbf{elif}\;i \leq 1.4:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\end{array}
\end{array}
if i < -1.2e20Initial program 65.7%
Taylor expanded in b around inf 55.9%
Taylor expanded in a around inf 42.4%
Taylor expanded in b around 0 48.2%
*-commutative48.2%
Simplified48.2%
if -1.2e20 < i < 4.99999999999999985e-278Initial program 82.0%
Taylor expanded in x around inf 47.5%
*-commutative47.5%
Simplified47.5%
Taylor expanded in z around inf 25.2%
*-commutative25.2%
Simplified25.2%
if 4.99999999999999985e-278 < i < 9.9999999999999991e-97Initial program 87.8%
Taylor expanded in t around inf 63.0%
+-commutative63.0%
mul-1-neg63.0%
unsub-neg63.0%
Simplified63.0%
Taylor expanded in c around inf 42.9%
if 9.9999999999999991e-97 < i < 1.3999999999999999Initial program 81.2%
Taylor expanded in y around inf 44.8%
Taylor expanded in i around 0 25.9%
*-commutative25.9%
Simplified25.9%
if 1.3999999999999999 < i Initial program 60.8%
Taylor expanded in b around inf 54.2%
Taylor expanded in a around inf 48.2%
Final simplification39.1%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= a -1.65e+232)
(* t (* x (- a)))
(if (or (<= a -1.95e+30) (not (<= a 1.1e+210)))
(* b (- (* a i) (* z c)))
(* c (- (* t j) (* 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 (a <= -1.65e+232) {
tmp = t * (x * -a);
} else if ((a <= -1.95e+30) || !(a <= 1.1e+210)) {
tmp = b * ((a * i) - (z * c));
} else {
tmp = c * ((t * j) - (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 (a <= (-1.65d+232)) then
tmp = t * (x * -a)
else if ((a <= (-1.95d+30)) .or. (.not. (a <= 1.1d+210))) then
tmp = b * ((a * i) - (z * c))
else
tmp = c * ((t * j) - (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 (a <= -1.65e+232) {
tmp = t * (x * -a);
} else if ((a <= -1.95e+30) || !(a <= 1.1e+210)) {
tmp = b * ((a * i) - (z * c));
} else {
tmp = c * ((t * j) - (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if a <= -1.65e+232: tmp = t * (x * -a) elif (a <= -1.95e+30) or not (a <= 1.1e+210): tmp = b * ((a * i) - (z * c)) else: tmp = c * ((t * j) - (z * b)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (a <= -1.65e+232) tmp = Float64(t * Float64(x * Float64(-a))); elseif ((a <= -1.95e+30) || !(a <= 1.1e+210)) tmp = Float64(b * Float64(Float64(a * i) - Float64(z * c))); else tmp = Float64(c * Float64(Float64(t * j) - Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (a <= -1.65e+232) tmp = t * (x * -a); elseif ((a <= -1.95e+30) || ~((a <= 1.1e+210))) tmp = b * ((a * i) - (z * c)); else tmp = c * ((t * j) - (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[a, -1.65e+232], N[(t * N[(x * (-a)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -1.95e+30], N[Not[LessEqual[a, 1.1e+210]], $MachinePrecision]], N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(N[(t * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{+232}:\\
\;\;\;\;t \cdot \left(x \cdot \left(-a\right)\right)\\
\mathbf{elif}\;a \leq -1.95 \cdot 10^{+30} \lor \neg \left(a \leq 1.1 \cdot 10^{+210}\right):\\
\;\;\;\;b \cdot \left(a \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right)\\
\end{array}
\end{array}
if a < -1.65e232Initial program 55.3%
Taylor expanded in t around inf 64.8%
+-commutative64.8%
mul-1-neg64.8%
unsub-neg64.8%
Simplified64.8%
Taylor expanded in c around 0 64.8%
mul-1-neg64.8%
distribute-lft-neg-out64.8%
*-commutative64.8%
Simplified64.8%
if -1.65e232 < a < -1.95000000000000005e30 or 1.09999999999999993e210 < a Initial program 68.5%
Taylor expanded in b around inf 65.3%
if -1.95000000000000005e30 < a < 1.09999999999999993e210Initial program 79.1%
Taylor expanded in c around inf 51.3%
Final simplification55.9%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -8e+134)
(* c (* t j))
(if (<= j 2.9e+94)
(* b (- (* a i) (* z c)))
(if (<= j 2.25e+257) (* y (* i (- j))) (* t (* c j))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -8e+134) {
tmp = c * (t * j);
} else if (j <= 2.9e+94) {
tmp = b * ((a * i) - (z * c));
} else if (j <= 2.25e+257) {
tmp = y * (i * -j);
} else {
tmp = t * (c * j);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (j <= (-8d+134)) then
tmp = c * (t * j)
else if (j <= 2.9d+94) then
tmp = b * ((a * i) - (z * c))
else if (j <= 2.25d+257) then
tmp = y * (i * -j)
else
tmp = t * (c * j)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -8e+134) {
tmp = c * (t * j);
} else if (j <= 2.9e+94) {
tmp = b * ((a * i) - (z * c));
} else if (j <= 2.25e+257) {
tmp = y * (i * -j);
} else {
tmp = t * (c * j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -8e+134: tmp = c * (t * j) elif j <= 2.9e+94: tmp = b * ((a * i) - (z * c)) elif j <= 2.25e+257: tmp = y * (i * -j) else: tmp = t * (c * j) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -8e+134) tmp = Float64(c * Float64(t * j)); elseif (j <= 2.9e+94) tmp = Float64(b * Float64(Float64(a * i) - Float64(z * c))); elseif (j <= 2.25e+257) tmp = Float64(y * Float64(i * Float64(-j))); else tmp = Float64(t * Float64(c * j)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (j <= -8e+134) tmp = c * (t * j); elseif (j <= 2.9e+94) tmp = b * ((a * i) - (z * c)); elseif (j <= 2.25e+257) tmp = y * (i * -j); else tmp = t * (c * j); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -8e+134], N[(c * N[(t * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.9e+94], N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.25e+257], N[(y * N[(i * (-j)), $MachinePrecision]), $MachinePrecision], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -8 \cdot 10^{+134}:\\
\;\;\;\;c \cdot \left(t \cdot j\right)\\
\mathbf{elif}\;j \leq 2.9 \cdot 10^{+94}:\\
\;\;\;\;b \cdot \left(a \cdot i - z \cdot c\right)\\
\mathbf{elif}\;j \leq 2.25 \cdot 10^{+257}:\\
\;\;\;\;y \cdot \left(i \cdot \left(-j\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\end{array}
\end{array}
if j < -7.99999999999999937e134Initial program 81.5%
Taylor expanded in t around inf 54.7%
+-commutative54.7%
mul-1-neg54.7%
unsub-neg54.7%
Simplified54.7%
Taylor expanded in c around inf 52.2%
if -7.99999999999999937e134 < j < 2.8999999999999998e94Initial program 72.0%
Taylor expanded in b around inf 50.7%
if 2.8999999999999998e94 < j < 2.25e257Initial program 79.3%
Taylor expanded in y around inf 52.9%
Taylor expanded in i around inf 38.9%
mul-1-neg38.9%
associate-*r*52.5%
distribute-lft-neg-out52.5%
*-commutative52.5%
distribute-lft-neg-in52.5%
Simplified52.5%
if 2.25e257 < j Initial program 62.5%
Taylor expanded in t around inf 87.9%
+-commutative87.9%
mul-1-neg87.9%
unsub-neg87.9%
Simplified87.9%
Taylor expanded in c around inf 87.9%
Final simplification52.4%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= i -3.4e+17)
(* a (* b i))
(if (<= i 5.2e-278)
(* z (* x y))
(if (<= i 2.7e-22) (* c (* t j)) (* b (* a 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 <= -3.4e+17) {
tmp = a * (b * i);
} else if (i <= 5.2e-278) {
tmp = z * (x * y);
} else if (i <= 2.7e-22) {
tmp = c * (t * j);
} else {
tmp = b * (a * 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 <= (-3.4d+17)) then
tmp = a * (b * i)
else if (i <= 5.2d-278) then
tmp = z * (x * y)
else if (i <= 2.7d-22) then
tmp = c * (t * j)
else
tmp = b * (a * 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 <= -3.4e+17) {
tmp = a * (b * i);
} else if (i <= 5.2e-278) {
tmp = z * (x * y);
} else if (i <= 2.7e-22) {
tmp = c * (t * j);
} else {
tmp = b * (a * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -3.4e+17: tmp = a * (b * i) elif i <= 5.2e-278: tmp = z * (x * y) elif i <= 2.7e-22: tmp = c * (t * j) else: tmp = b * (a * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -3.4e+17) tmp = Float64(a * Float64(b * i)); elseif (i <= 5.2e-278) tmp = Float64(z * Float64(x * y)); elseif (i <= 2.7e-22) tmp = Float64(c * Float64(t * j)); else tmp = Float64(b * Float64(a * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -3.4e+17) tmp = a * (b * i); elseif (i <= 5.2e-278) tmp = z * (x * y); elseif (i <= 2.7e-22) tmp = c * (t * j); else tmp = b * (a * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -3.4e+17], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 5.2e-278], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.7e-22], N[(c * N[(t * j), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -3.4 \cdot 10^{+17}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;i \leq 5.2 \cdot 10^{-278}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;i \leq 2.7 \cdot 10^{-22}:\\
\;\;\;\;c \cdot \left(t \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\end{array}
\end{array}
if i < -3.4e17Initial program 65.7%
Taylor expanded in b around inf 55.9%
Taylor expanded in a around inf 42.4%
Taylor expanded in b around 0 48.2%
*-commutative48.2%
Simplified48.2%
if -3.4e17 < i < 5.1999999999999997e-278Initial program 82.0%
Taylor expanded in x around inf 47.5%
*-commutative47.5%
Simplified47.5%
Taylor expanded in z around inf 45.0%
mul-1-neg45.0%
unsub-neg45.0%
associate-/l*44.9%
Simplified44.9%
Taylor expanded in z around inf 25.2%
*-commutative25.2%
*-commutative25.2%
associate-*r*26.4%
Simplified26.4%
if 5.1999999999999997e-278 < i < 2.7000000000000002e-22Initial program 89.7%
Taylor expanded in t around inf 58.6%
+-commutative58.6%
mul-1-neg58.6%
unsub-neg58.6%
Simplified58.6%
Taylor expanded in c around inf 40.0%
if 2.7000000000000002e-22 < i Initial program 60.4%
Taylor expanded in b around inf 52.0%
Taylor expanded in a around inf 43.9%
Final simplification38.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= i -5e+22) (not (<= i 5e+15))) (* i (- (* a b) (* y j))) (* c (- (* t j) (* 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 ((i <= -5e+22) || !(i <= 5e+15)) {
tmp = i * ((a * b) - (y * j));
} else {
tmp = c * ((t * j) - (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 ((i <= (-5d+22)) .or. (.not. (i <= 5d+15))) then
tmp = i * ((a * b) - (y * j))
else
tmp = c * ((t * j) - (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 ((i <= -5e+22) || !(i <= 5e+15)) {
tmp = i * ((a * b) - (y * j));
} else {
tmp = c * ((t * j) - (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (i <= -5e+22) or not (i <= 5e+15): tmp = i * ((a * b) - (y * j)) else: tmp = c * ((t * j) - (z * b)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((i <= -5e+22) || !(i <= 5e+15)) tmp = Float64(i * Float64(Float64(a * b) - Float64(y * j))); else tmp = Float64(c * Float64(Float64(t * j) - Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((i <= -5e+22) || ~((i <= 5e+15))) tmp = i * ((a * b) - (y * j)); else tmp = c * ((t * j) - (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[i, -5e+22], N[Not[LessEqual[i, 5e+15]], $MachinePrecision]], N[(i * N[(N[(a * b), $MachinePrecision] - N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(c * N[(N[(t * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -5 \cdot 10^{+22} \lor \neg \left(i \leq 5 \cdot 10^{+15}\right):\\
\;\;\;\;i \cdot \left(a \cdot b - y \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right)\\
\end{array}
\end{array}
if i < -4.9999999999999996e22 or 5e15 < i Initial program 62.5%
+-commutative62.5%
fma-define66.0%
*-commutative66.0%
*-commutative66.0%
cancel-sign-sub-inv66.0%
cancel-sign-sub66.0%
sub-neg66.0%
sub-neg66.0%
*-commutative66.0%
fma-neg66.8%
*-commutative66.8%
distribute-rgt-neg-out66.8%
remove-double-neg66.8%
*-commutative66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in x around inf 62.7%
+-commutative62.7%
mul-1-neg62.7%
unsub-neg62.7%
+-commutative62.7%
mul-1-neg62.7%
unsub-neg62.7%
*-commutative62.7%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in i around inf 63.0%
+-commutative63.0%
mul-1-neg63.0%
unsub-neg63.0%
*-commutative63.0%
*-commutative63.0%
Simplified63.0%
if -4.9999999999999996e22 < i < 5e15Initial program 84.0%
Taylor expanded in c around inf 53.0%
Final simplification57.5%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= i -1.55e+116) (* a (* b i)) (if (<= i 3.6e-22) (* c (* t j)) (* b (* a i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.55e+116) {
tmp = a * (b * i);
} else if (i <= 3.6e-22) {
tmp = c * (t * j);
} else {
tmp = b * (a * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (i <= (-1.55d+116)) then
tmp = a * (b * i)
else if (i <= 3.6d-22) then
tmp = c * (t * j)
else
tmp = b * (a * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.55e+116) {
tmp = a * (b * i);
} else if (i <= 3.6e-22) {
tmp = c * (t * j);
} else {
tmp = b * (a * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -1.55e+116: tmp = a * (b * i) elif i <= 3.6e-22: tmp = c * (t * j) else: tmp = b * (a * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -1.55e+116) tmp = Float64(a * Float64(b * i)); elseif (i <= 3.6e-22) tmp = Float64(c * Float64(t * j)); else tmp = Float64(b * Float64(a * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -1.55e+116) tmp = a * (b * i); elseif (i <= 3.6e-22) tmp = c * (t * j); else tmp = b * (a * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -1.55e+116], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 3.6e-22], N[(c * N[(t * j), $MachinePrecision]), $MachinePrecision], N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.55 \cdot 10^{+116}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{elif}\;i \leq 3.6 \cdot 10^{-22}:\\
\;\;\;\;c \cdot \left(t \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\end{array}
\end{array}
if i < -1.54999999999999998e116Initial program 57.7%
Taylor expanded in b around inf 63.9%
Taylor expanded in a around inf 50.1%
Taylor expanded in b around 0 58.3%
*-commutative58.3%
Simplified58.3%
if -1.54999999999999998e116 < i < 3.5999999999999998e-22Initial program 85.4%
Taylor expanded in t around inf 48.3%
+-commutative48.3%
mul-1-neg48.3%
unsub-neg48.3%
Simplified48.3%
Taylor expanded in c around inf 28.7%
if 3.5999999999999998e-22 < i Initial program 60.4%
Taylor expanded in b around inf 52.0%
Taylor expanded in a around inf 43.9%
Final simplification37.2%
(FPCore (x y z t a b c i j) :precision binary64 (* a (* b i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (b * i);
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = a * (b * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (b * i);
}
def code(x, y, z, t, a, b, c, i, j): return a * (b * i)
function code(x, y, z, t, a, b, c, i, j) return Float64(a * Float64(b * i)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = a * (b * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(b \cdot i\right)
\end{array}
Initial program 74.3%
Taylor expanded in b around inf 45.0%
Taylor expanded in a around inf 24.5%
Taylor expanded in b around 0 25.3%
*-commutative25.3%
Simplified25.3%
Final simplification25.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1
(+
(- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a))))
(/
(* j (- (pow (* c t) 2.0) (pow (* i y) 2.0)))
(+ (* c t) (* i y)))))
(t_2
(-
(* x (- (* z y) (* a t)))
(- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))
(if (< t -8.120978919195912e-33)
t_2
(if (< t -4.712553818218485e-169)
t_1
(if (< t -7.633533346031584e-308)
t_2
(if (< t 1.0535888557455487e-139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (pow((c * t), 2.0) - pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ** 2.0d0) - ((i * y) ** 2.0d0))) / ((c * t) + (i * y)))
t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j))
if (t < (-8.120978919195912d-33)) then
tmp = t_2
else if (t < (-4.712553818218485d-169)) then
tmp = t_1
else if (t < (-7.633533346031584d-308)) then
tmp = t_2
else if (t < 1.0535888557455487d-139) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (Math.pow((c * t), 2.0) - Math.pow((i * y), 2.0))) / ((c * t) + (i * y)));
double t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j));
double tmp;
if (t < -8.120978919195912e-33) {
tmp = t_2;
} else if (t < -4.712553818218485e-169) {
tmp = t_1;
} else if (t < -7.633533346031584e-308) {
tmp = t_2;
} else if (t < 1.0535888557455487e-139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (math.pow((c * t), 2.0) - math.pow((i * y), 2.0))) / ((c * t) + (i * y))) t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)) tmp = 0 if t < -8.120978919195912e-33: tmp = t_2 elif t < -4.712553818218485e-169: tmp = t_1 elif t < -7.633533346031584e-308: tmp = t_2 elif t < 1.0535888557455487e-139: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) - Float64(b * Float64(Float64(c * z) - Float64(i * a)))) + Float64(Float64(j * Float64((Float64(c * t) ^ 2.0) - (Float64(i * y) ^ 2.0))) / Float64(Float64(c * t) + Float64(i * y)))) t_2 = Float64(Float64(x * Float64(Float64(z * y) - Float64(a * t))) - Float64(Float64(b * Float64(Float64(z * c) - Float64(a * i))) - Float64(Float64(Float64(c * t) - Float64(y * i)) * j))) tmp = 0.0 if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = ((x * ((y * z) - (t * a))) - (b * ((c * z) - (i * a)))) + ((j * (((c * t) ^ 2.0) - ((i * y) ^ 2.0))) / ((c * t) + (i * y))); t_2 = (x * ((z * y) - (a * t))) - ((b * ((z * c) - (a * i))) - (((c * t) - (y * i)) * j)); tmp = 0.0; if (t < -8.120978919195912e-33) tmp = t_2; elseif (t < -4.712553818218485e-169) tmp = t_1; elseif (t < -7.633533346031584e-308) tmp = t_2; elseif (t < 1.0535888557455487e-139) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(c * z), $MachinePrecision] - N[(i * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(j * N[(N[Power[N[(c * t), $MachinePrecision], 2.0], $MachinePrecision] - N[Power[N[(i * y), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(c * t), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * N[(N[(z * y), $MachinePrecision] - N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(N[(z * c), $MachinePrecision] - N[(a * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(c * t), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision] * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -8.120978919195912e-33], t$95$2, If[Less[t, -4.712553818218485e-169], t$95$1, If[Less[t, -7.633533346031584e-308], t$95$2, If[Less[t, 1.0535888557455487e-139], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \frac{j \cdot \left({\left(c \cdot t\right)}^{2} - {\left(i \cdot y\right)}^{2}\right)}{c \cdot t + i \cdot y}\\
t_2 := x \cdot \left(z \cdot y - a \cdot t\right) - \left(b \cdot \left(z \cdot c - a \cdot i\right) - \left(c \cdot t - y \cdot i\right) \cdot j\right)\\
\mathbf{if}\;t < -8.120978919195912 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < -4.712553818218485 \cdot 10^{-169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < -7.633533346031584 \cdot 10^{-308}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t < 1.0535888557455487 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024079
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:alt
(if (< t -8.120978919195912e-33) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t -4.712553818218485e-169) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (if (< t -7.633533346031584e-308) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j))) (if (< t 1.0535888557455487e-139) (+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (/ (* j (- (pow (* c t) 2.0) (pow (* i y) 2.0))) (+ (* c t) (* i y)))) (- (* x (- (* z y) (* a t))) (- (* b (- (* z c) (* a i))) (* (- (* c t) (* y i)) j)))))))
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))