
(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 20 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 (* b (- (* a i) (* z c)))) (t_2 (- (* t c) (* y i))))
(if (<= (+ (+ (* x (- (* y z) (* t a))) t_1) (* j t_2)) INFINITY)
(fma j t_2 (+ (* x (fma y z (* t (- a)))) t_1))
(- t_1 (* i (* y j))))))
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) - (y * i);
double tmp;
if ((((x * ((y * z) - (t * a))) + t_1) + (j * t_2)) <= ((double) INFINITY)) {
tmp = fma(j, t_2, ((x * fma(y, z, (t * -a))) + t_1));
} else {
tmp = t_1 - (i * (y * j));
}
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(Float64(t * c) - Float64(y * i)) tmp = 0.0 if (Float64(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + t_1) + Float64(j * t_2)) <= Inf) tmp = fma(j, t_2, Float64(Float64(x * fma(y, z, Float64(t * Float64(-a)))) + t_1)); else tmp = Float64(t_1 - Float64(i * Float64(y * j))); end return 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[(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] + t$95$1), $MachinePrecision] + N[(j * t$95$2), $MachinePrecision]), $MachinePrecision], Infinity], N[(j * t$95$2 + N[(N[(x * N[(y * z + N[(t * (-a)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$1 - N[(i * N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - z \cdot c\right)\\
t_2 := t \cdot c - y \cdot i\\
\mathbf{if}\;\left(x \cdot \left(y \cdot z - t \cdot a\right) + t_1\right) + j \cdot t_2 \leq \infty:\\
\;\;\;\;\mathsf{fma}\left(j, t_2, x \cdot \mathsf{fma}\left(y, z, t \cdot \left(-a\right)\right) + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 - i \cdot \left(y \cdot j\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 92.8%
+-commutative92.8%
fma-def92.8%
*-commutative92.8%
*-commutative92.8%
cancel-sign-sub-inv92.8%
cancel-sign-sub92.8%
fma-neg92.8%
distribute-rgt-neg-out92.8%
remove-double-neg92.8%
*-commutative92.8%
*-commutative92.8%
Simplified92.8%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in x around 0 38.1%
*-commutative38.1%
Simplified38.1%
Taylor expanded in t around 0 57.1%
associate-*r*57.1%
neg-mul-157.1%
Simplified57.1%
Final simplification85.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* z c))))
(t_2 (+ (+ (* x (- (* y z) (* t a))) t_1) (* j (- (* t c) (* y i))))))
(if (<= t_2 INFINITY) t_2 (- t_1 (* i (* y j))))))
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 = ((x * ((y * z) - (t * a))) + t_1) + (j * ((t * c) - (y * i)));
double tmp;
if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = t_1 - (i * (y * j));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (z * c));
double t_2 = ((x * ((y * z) - (t * a))) + t_1) + (j * ((t * c) - (y * i)));
double tmp;
if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = t_1 - (i * (y * j));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((a * i) - (z * c)) t_2 = ((x * ((y * z) - (t * a))) + t_1) + (j * ((t * c) - (y * i))) tmp = 0 if t_2 <= math.inf: tmp = t_2 else: tmp = t_1 - (i * (y * j)) 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(Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + t_1) + Float64(j * Float64(Float64(t * c) - Float64(y * i)))) tmp = 0.0 if (t_2 <= Inf) tmp = t_2; else tmp = Float64(t_1 - Float64(i * Float64(y * j))); 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 = ((x * ((y * z) - (t * a))) + t_1) + (j * ((t * c) - (y * i))); tmp = 0.0; if (t_2 <= Inf) tmp = t_2; else tmp = t_1 - (i * (y * j)); 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[(N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, Infinity], t$95$2, N[(t$95$1 - N[(i * N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - z \cdot c\right)\\
t_2 := \left(x \cdot \left(y \cdot z - t \cdot a\right) + t_1\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{if}\;t_2 \leq \infty:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 - i \cdot \left(y \cdot j\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 92.8%
if +inf.0 < (+.f64 (-.f64 (*.f64 x (-.f64 (*.f64 y z) (*.f64 t a))) (*.f64 b (-.f64 (*.f64 c z) (*.f64 i a)))) (*.f64 j (-.f64 (*.f64 c t) (*.f64 i y)))) Initial program 0.0%
Taylor expanded in x around 0 38.1%
*-commutative38.1%
Simplified38.1%
Taylor expanded in t around 0 57.1%
associate-*r*57.1%
neg-mul-157.1%
Simplified57.1%
Final simplification85.4%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* z c)))) (t_2 (+ (* j (* t c)) t_1)))
(if (<= b -8.5e+61)
(- t_1 (* i (* y j)))
(if (<= b -4.8e-18)
t_2
(if (<= b -5e-54)
t_1
(if (<= b 2e+118)
(+ (* x (- (* y z) (* t a))) (* j (- (* t c) (* y i))))
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 = (j * (t * c)) + t_1;
double tmp;
if (b <= -8.5e+61) {
tmp = t_1 - (i * (y * j));
} else if (b <= -4.8e-18) {
tmp = t_2;
} else if (b <= -5e-54) {
tmp = t_1;
} else if (b <= 2e+118) {
tmp = (x * ((y * z) - (t * a))) + (j * ((t * c) - (y * i)));
} 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 = (j * (t * c)) + t_1
if (b <= (-8.5d+61)) then
tmp = t_1 - (i * (y * j))
else if (b <= (-4.8d-18)) then
tmp = t_2
else if (b <= (-5d-54)) then
tmp = t_1
else if (b <= 2d+118) then
tmp = (x * ((y * z) - (t * a))) + (j * ((t * c) - (y * i)))
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 = (j * (t * c)) + t_1;
double tmp;
if (b <= -8.5e+61) {
tmp = t_1 - (i * (y * j));
} else if (b <= -4.8e-18) {
tmp = t_2;
} else if (b <= -5e-54) {
tmp = t_1;
} else if (b <= 2e+118) {
tmp = (x * ((y * z) - (t * a))) + (j * ((t * c) - (y * i)));
} 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 = (j * (t * c)) + t_1 tmp = 0 if b <= -8.5e+61: tmp = t_1 - (i * (y * j)) elif b <= -4.8e-18: tmp = t_2 elif b <= -5e-54: tmp = t_1 elif b <= 2e+118: tmp = (x * ((y * z) - (t * a))) + (j * ((t * c) - (y * i))) 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(Float64(j * Float64(t * c)) + t_1) tmp = 0.0 if (b <= -8.5e+61) tmp = Float64(t_1 - Float64(i * Float64(y * j))); elseif (b <= -4.8e-18) tmp = t_2; elseif (b <= -5e-54) tmp = t_1; elseif (b <= 2e+118) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + Float64(j * Float64(Float64(t * c) - Float64(y * i)))); 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 = (j * (t * c)) + t_1; tmp = 0.0; if (b <= -8.5e+61) tmp = t_1 - (i * (y * j)); elseif (b <= -4.8e-18) tmp = t_2; elseif (b <= -5e-54) tmp = t_1; elseif (b <= 2e+118) tmp = (x * ((y * z) - (t * a))) + (j * ((t * c) - (y * i))); 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[(N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[b, -8.5e+61], N[(t$95$1 - N[(i * N[(y * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.8e-18], t$95$2, If[LessEqual[b, -5e-54], t$95$1, If[LessEqual[b, 2e+118], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $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 := j \cdot \left(t \cdot c\right) + t_1\\
\mathbf{if}\;b \leq -8.5 \cdot 10^{+61}:\\
\;\;\;\;t_1 - i \cdot \left(y \cdot j\right)\\
\mathbf{elif}\;b \leq -4.8 \cdot 10^{-18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -5 \cdot 10^{-54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+118}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -8.50000000000000035e61Initial program 74.9%
Taylor expanded in x around 0 73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in t around 0 75.4%
associate-*r*75.4%
neg-mul-175.4%
Simplified75.4%
if -8.50000000000000035e61 < b < -4.79999999999999988e-18 or 1.99999999999999993e118 < b Initial program 76.5%
Taylor expanded in x around 0 87.6%
*-commutative87.6%
Simplified87.6%
Taylor expanded in c around inf 84.5%
if -4.79999999999999988e-18 < b < -5.00000000000000015e-54Initial program 50.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
if -5.00000000000000015e-54 < b < 1.99999999999999993e118Initial program 72.3%
Taylor expanded in b around 0 69.6%
Final simplification75.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (+ (* j (* t c)) (* b (- (* a i) (* z c)))))
(t_2 (* y (- (* x z) (* i j)))))
(if (<= y -4.2e+32)
t_2
(if (<= y -4.1e-100)
t_1
(if (<= y -2.55e-120)
(* t (- (* c j) (* x a)))
(if (<= y 1.25e+156) 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 * (t * c)) + (b * ((a * i) - (z * c)));
double t_2 = y * ((x * z) - (i * j));
double tmp;
if (y <= -4.2e+32) {
tmp = t_2;
} else if (y <= -4.1e-100) {
tmp = t_1;
} else if (y <= -2.55e-120) {
tmp = t * ((c * j) - (x * a));
} else if (y <= 1.25e+156) {
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 = (j * (t * c)) + (b * ((a * i) - (z * c)))
t_2 = y * ((x * z) - (i * j))
if (y <= (-4.2d+32)) then
tmp = t_2
else if (y <= (-4.1d-100)) then
tmp = t_1
else if (y <= (-2.55d-120)) then
tmp = t * ((c * j) - (x * a))
else if (y <= 1.25d+156) 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 = (j * (t * c)) + (b * ((a * i) - (z * c)));
double t_2 = y * ((x * z) - (i * j));
double tmp;
if (y <= -4.2e+32) {
tmp = t_2;
} else if (y <= -4.1e-100) {
tmp = t_1;
} else if (y <= -2.55e-120) {
tmp = t * ((c * j) - (x * a));
} else if (y <= 1.25e+156) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = (j * (t * c)) + (b * ((a * i) - (z * c))) t_2 = y * ((x * z) - (i * j)) tmp = 0 if y <= -4.2e+32: tmp = t_2 elif y <= -4.1e-100: tmp = t_1 elif y <= -2.55e-120: tmp = t * ((c * j) - (x * a)) elif y <= 1.25e+156: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(Float64(j * Float64(t * c)) + Float64(b * Float64(Float64(a * i) - Float64(z * c)))) t_2 = Float64(y * Float64(Float64(x * z) - Float64(i * j))) tmp = 0.0 if (y <= -4.2e+32) tmp = t_2; elseif (y <= -4.1e-100) tmp = t_1; elseif (y <= -2.55e-120) tmp = Float64(t * Float64(Float64(c * j) - Float64(x * a))); elseif (y <= 1.25e+156) 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 = (j * (t * c)) + (b * ((a * i) - (z * c))); t_2 = y * ((x * z) - (i * j)); tmp = 0.0; if (y <= -4.2e+32) tmp = t_2; elseif (y <= -4.1e-100) tmp = t_1; elseif (y <= -2.55e-120) tmp = t * ((c * j) - (x * a)); elseif (y <= 1.25e+156) 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[(j * N[(t * c), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.2e+32], t$95$2, If[LessEqual[y, -4.1e-100], t$95$1, If[LessEqual[y, -2.55e-120], N[(t * N[(N[(c * j), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.25e+156], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(t \cdot c\right) + b \cdot \left(a \cdot i - z \cdot c\right)\\
t_2 := y \cdot \left(x \cdot z - i \cdot j\right)\\
\mathbf{if}\;y \leq -4.2 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -2.55 \cdot 10^{-120}:\\
\;\;\;\;t \cdot \left(c \cdot j - x \cdot a\right)\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{+156}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -4.2000000000000001e32 or 1.24999999999999998e156 < y Initial program 66.2%
Taylor expanded in y around -inf 71.8%
mul-1-neg71.8%
*-commutative71.8%
distribute-rgt-neg-in71.8%
+-commutative71.8%
mul-1-neg71.8%
unsub-neg71.8%
Simplified71.8%
if -4.2000000000000001e32 < y < -4.0999999999999999e-100 or -2.5499999999999999e-120 < y < 1.24999999999999998e156Initial program 78.1%
Taylor expanded in x around 0 74.4%
*-commutative74.4%
Simplified74.4%
Taylor expanded in c around inf 71.5%
if -4.0999999999999999e-100 < y < -2.5499999999999999e-120Initial program 74.8%
Taylor expanded in t around inf 77.8%
Taylor expanded in a around 0 64.6%
associate-*r*77.1%
+-commutative77.1%
associate-*r*77.1%
neg-mul-177.1%
cancel-sign-sub-inv77.1%
*-commutative77.1%
associate-*l*77.8%
distribute-rgt-out--77.8%
*-commutative77.8%
Simplified77.8%
Final simplification71.8%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* z c)))) (t_2 (* j (- (* t c) (* y i)))))
(if (<= j -6e+144)
t_2
(if (<= j -1.45e+71)
t_1
(if (<= j -1.1e-39)
t_2
(if (<= j -1.15e-81) (* x (* y z)) (if (<= j 9.4e-20) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (z * c));
double t_2 = j * ((t * c) - (y * i));
double tmp;
if (j <= -6e+144) {
tmp = t_2;
} else if (j <= -1.45e+71) {
tmp = t_1;
} else if (j <= -1.1e-39) {
tmp = t_2;
} else if (j <= -1.15e-81) {
tmp = x * (y * z);
} else if (j <= 9.4e-20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * ((a * i) - (z * c))
t_2 = j * ((t * c) - (y * i))
if (j <= (-6d+144)) then
tmp = t_2
else if (j <= (-1.45d+71)) then
tmp = t_1
else if (j <= (-1.1d-39)) then
tmp = t_2
else if (j <= (-1.15d-81)) then
tmp = x * (y * z)
else if (j <= 9.4d-20) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (z * c));
double t_2 = j * ((t * c) - (y * i));
double tmp;
if (j <= -6e+144) {
tmp = t_2;
} else if (j <= -1.45e+71) {
tmp = t_1;
} else if (j <= -1.1e-39) {
tmp = t_2;
} else if (j <= -1.15e-81) {
tmp = x * (y * z);
} else if (j <= 9.4e-20) {
tmp = t_1;
} 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 = j * ((t * c) - (y * i)) tmp = 0 if j <= -6e+144: tmp = t_2 elif j <= -1.45e+71: tmp = t_1 elif j <= -1.1e-39: tmp = t_2 elif j <= -1.15e-81: tmp = x * (y * z) elif j <= 9.4e-20: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(Float64(a * i) - Float64(z * c))) t_2 = Float64(j * Float64(Float64(t * c) - Float64(y * i))) tmp = 0.0 if (j <= -6e+144) tmp = t_2; elseif (j <= -1.45e+71) tmp = t_1; elseif (j <= -1.1e-39) tmp = t_2; elseif (j <= -1.15e-81) tmp = Float64(x * Float64(y * z)); elseif (j <= 9.4e-20) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * ((a * i) - (z * c)); t_2 = j * ((t * c) - (y * i)); tmp = 0.0; if (j <= -6e+144) tmp = t_2; elseif (j <= -1.45e+71) tmp = t_1; elseif (j <= -1.1e-39) tmp = t_2; elseif (j <= -1.15e-81) tmp = x * (y * z); elseif (j <= 9.4e-20) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -6e+144], t$95$2, If[LessEqual[j, -1.45e+71], t$95$1, If[LessEqual[j, -1.1e-39], t$95$2, If[LessEqual[j, -1.15e-81], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 9.4e-20], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - z \cdot c\right)\\
t_2 := j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -6 \cdot 10^{+144}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -1.45 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -1.1 \cdot 10^{-39}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;j \leq -1.15 \cdot 10^{-81}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;j \leq 9.4 \cdot 10^{-20}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if j < -5.9999999999999998e144 or -1.45000000000000004e71 < j < -1.1e-39 or 9.4000000000000003e-20 < j Initial program 76.8%
Taylor expanded in x around 0 77.9%
*-commutative77.9%
Simplified77.9%
Taylor expanded in j around inf 67.8%
if -5.9999999999999998e144 < j < -1.45000000000000004e71 or -1.14999999999999996e-81 < j < 9.4000000000000003e-20Initial program 69.9%
Taylor expanded in b around inf 59.4%
*-commutative59.4%
Simplified59.4%
if -1.1e-39 < j < -1.14999999999999996e-81Initial program 85.7%
Taylor expanded in z around inf 58.6%
*-commutative58.6%
*-commutative58.6%
Simplified58.6%
Taylor expanded in y around inf 58.6%
Taylor expanded in z around 0 71.9%
Final simplification63.7%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (* a i))))
(if (<= a -4e+168)
t_1
(if (<= a -4.2e+39)
(* c (* t j))
(if (<= a -4e-15)
(* x (* y z))
(if (<= a -2.4e-89)
(* j (* t c))
(if (<= a 2.85e+149) (* b (* 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 = b * (a * i);
double tmp;
if (a <= -4e+168) {
tmp = t_1;
} else if (a <= -4.2e+39) {
tmp = c * (t * j);
} else if (a <= -4e-15) {
tmp = x * (y * z);
} else if (a <= -2.4e-89) {
tmp = j * (t * c);
} else if (a <= 2.85e+149) {
tmp = b * (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 = b * (a * i)
if (a <= (-4d+168)) then
tmp = t_1
else if (a <= (-4.2d+39)) then
tmp = c * (t * j)
else if (a <= (-4d-15)) then
tmp = x * (y * z)
else if (a <= (-2.4d-89)) then
tmp = j * (t * c)
else if (a <= 2.85d+149) then
tmp = b * (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 = b * (a * i);
double tmp;
if (a <= -4e+168) {
tmp = t_1;
} else if (a <= -4.2e+39) {
tmp = c * (t * j);
} else if (a <= -4e-15) {
tmp = x * (y * z);
} else if (a <= -2.4e-89) {
tmp = j * (t * c);
} else if (a <= 2.85e+149) {
tmp = b * (z * -c);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * (a * i) tmp = 0 if a <= -4e+168: tmp = t_1 elif a <= -4.2e+39: tmp = c * (t * j) elif a <= -4e-15: tmp = x * (y * z) elif a <= -2.4e-89: tmp = j * (t * c) elif a <= 2.85e+149: tmp = b * (z * -c) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(b * Float64(a * i)) tmp = 0.0 if (a <= -4e+168) tmp = t_1; elseif (a <= -4.2e+39) tmp = Float64(c * Float64(t * j)); elseif (a <= -4e-15) tmp = Float64(x * Float64(y * z)); elseif (a <= -2.4e-89) tmp = Float64(j * Float64(t * c)); elseif (a <= 2.85e+149) tmp = Float64(b * Float64(z * Float64(-c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = b * (a * i); tmp = 0.0; if (a <= -4e+168) tmp = t_1; elseif (a <= -4.2e+39) tmp = c * (t * j); elseif (a <= -4e-15) tmp = x * (y * z); elseif (a <= -2.4e-89) tmp = j * (t * c); elseif (a <= 2.85e+149) tmp = b * (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[(b * N[(a * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4e+168], t$95$1, If[LessEqual[a, -4.2e+39], N[(c * N[(t * j), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -4e-15], N[(x * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.4e-89], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.85e+149], N[(b * N[(z * (-c)), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i\right)\\
\mathbf{if}\;a \leq -4 \cdot 10^{+168}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -4.2 \cdot 10^{+39}:\\
\;\;\;\;c \cdot \left(t \cdot j\right)\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-15}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-89}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\mathbf{elif}\;a \leq 2.85 \cdot 10^{+149}:\\
\;\;\;\;b \cdot \left(z \cdot \left(-c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -3.9999999999999997e168 or 2.84999999999999983e149 < a Initial program 59.8%
Taylor expanded in b around inf 62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in i around inf 54.0%
if -3.9999999999999997e168 < a < -4.1999999999999997e39Initial program 64.9%
Taylor expanded in t around inf 57.0%
Taylor expanded in a around 0 40.7%
*-commutative40.7%
Simplified40.7%
if -4.1999999999999997e39 < a < -4.0000000000000003e-15Initial program 83.3%
Taylor expanded in z around inf 42.9%
*-commutative42.9%
*-commutative42.9%
Simplified42.9%
Taylor expanded in y around inf 34.8%
Taylor expanded in z around 0 42.6%
if -4.0000000000000003e-15 < a < -2.40000000000000016e-89Initial program 79.8%
Taylor expanded in x around 0 69.0%
*-commutative69.0%
Simplified69.0%
Taylor expanded in c around inf 64.2%
*-commutative64.2%
associate-*l*69.5%
Simplified69.5%
Taylor expanded in t around inf 44.4%
*-commutative44.4%
associate-*l*53.7%
Simplified53.7%
if -2.40000000000000016e-89 < a < 2.84999999999999983e149Initial program 81.6%
Taylor expanded in b around inf 45.8%
*-commutative45.8%
Simplified45.8%
Taylor expanded in i around 0 38.1%
mul-1-neg38.1%
distribute-rgt-neg-out38.1%
Simplified38.1%
Final simplification44.2%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (- (* c j) (* x a)))))
(if (<= t -4.9e+42)
t_1
(if (<= t 1.8e-148)
(* b (- (* a i) (* z c)))
(if (<= t 2.45e-88)
(* z (* x y))
(if (<= t 1.45e+70) (* j (- (* t 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 = t * ((c * j) - (x * a));
double tmp;
if (t <= -4.9e+42) {
tmp = t_1;
} else if (t <= 1.8e-148) {
tmp = b * ((a * i) - (z * c));
} else if (t <= 2.45e-88) {
tmp = z * (x * y);
} else if (t <= 1.45e+70) {
tmp = j * ((t * 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 = t * ((c * j) - (x * a))
if (t <= (-4.9d+42)) then
tmp = t_1
else if (t <= 1.8d-148) then
tmp = b * ((a * i) - (z * c))
else if (t <= 2.45d-88) then
tmp = z * (x * y)
else if (t <= 1.45d+70) then
tmp = j * ((t * 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 = t * ((c * j) - (x * a));
double tmp;
if (t <= -4.9e+42) {
tmp = t_1;
} else if (t <= 1.8e-148) {
tmp = b * ((a * i) - (z * c));
} else if (t <= 2.45e-88) {
tmp = z * (x * y);
} else if (t <= 1.45e+70) {
tmp = j * ((t * c) - (y * i));
} 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 <= -4.9e+42: tmp = t_1 elif t <= 1.8e-148: tmp = b * ((a * i) - (z * c)) elif t <= 2.45e-88: tmp = z * (x * y) elif t <= 1.45e+70: tmp = j * ((t * c) - (y * i)) 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 <= -4.9e+42) tmp = t_1; elseif (t <= 1.8e-148) tmp = Float64(b * Float64(Float64(a * i) - Float64(z * c))); elseif (t <= 2.45e-88) tmp = Float64(z * Float64(x * y)); elseif (t <= 1.45e+70) tmp = Float64(j * Float64(Float64(t * 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 = t * ((c * j) - (x * a)); tmp = 0.0; if (t <= -4.9e+42) tmp = t_1; elseif (t <= 1.8e-148) tmp = b * ((a * i) - (z * c)); elseif (t <= 2.45e-88) tmp = z * (x * y); elseif (t <= 1.45e+70) tmp = j * ((t * 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[(t * N[(N[(c * j), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.9e+42], t$95$1, If[LessEqual[t, 1.8e-148], N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.45e-88], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.45e+70], N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $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 -4.9 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-148}:\\
\;\;\;\;b \cdot \left(a \cdot i - z \cdot c\right)\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-88}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+70}:\\
\;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.9000000000000002e42 or 1.4499999999999999e70 < t Initial program 63.7%
Taylor expanded in t around inf 64.3%
Taylor expanded in a around 0 51.3%
associate-*r*56.3%
+-commutative56.3%
associate-*r*56.3%
neg-mul-156.3%
cancel-sign-sub-inv56.3%
*-commutative56.3%
associate-*l*61.6%
distribute-rgt-out--64.3%
*-commutative64.3%
Simplified64.3%
if -4.9000000000000002e42 < t < 1.7999999999999999e-148Initial program 86.9%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
Simplified58.3%
if 1.7999999999999999e-148 < t < 2.45000000000000014e-88Initial program 60.7%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in y around inf 67.3%
if 2.45000000000000014e-88 < t < 1.4499999999999999e70Initial program 72.6%
Taylor expanded in x around 0 62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in j around inf 56.9%
Final simplification61.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* t (- (* c j) (* x a)))))
(if (<= t -2.3e+44)
t_1
(if (<= t 1.3e-150)
(* b (- (* a i) (* z c)))
(if (<= t 1.5e-88)
(* z (- (* x y) (* b c)))
(if (<= t 1e+73) (* j (- (* t 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 = t * ((c * j) - (x * a));
double tmp;
if (t <= -2.3e+44) {
tmp = t_1;
} else if (t <= 1.3e-150) {
tmp = b * ((a * i) - (z * c));
} else if (t <= 1.5e-88) {
tmp = z * ((x * y) - (b * c));
} else if (t <= 1e+73) {
tmp = j * ((t * 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 = t * ((c * j) - (x * a))
if (t <= (-2.3d+44)) then
tmp = t_1
else if (t <= 1.3d-150) then
tmp = b * ((a * i) - (z * c))
else if (t <= 1.5d-88) then
tmp = z * ((x * y) - (b * c))
else if (t <= 1d+73) then
tmp = j * ((t * 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 = t * ((c * j) - (x * a));
double tmp;
if (t <= -2.3e+44) {
tmp = t_1;
} else if (t <= 1.3e-150) {
tmp = b * ((a * i) - (z * c));
} else if (t <= 1.5e-88) {
tmp = z * ((x * y) - (b * c));
} else if (t <= 1e+73) {
tmp = j * ((t * c) - (y * i));
} 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 <= -2.3e+44: tmp = t_1 elif t <= 1.3e-150: tmp = b * ((a * i) - (z * c)) elif t <= 1.5e-88: tmp = z * ((x * y) - (b * c)) elif t <= 1e+73: tmp = j * ((t * c) - (y * i)) 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 <= -2.3e+44) tmp = t_1; elseif (t <= 1.3e-150) tmp = Float64(b * Float64(Float64(a * i) - Float64(z * c))); elseif (t <= 1.5e-88) tmp = Float64(z * Float64(Float64(x * y) - Float64(b * c))); elseif (t <= 1e+73) tmp = Float64(j * Float64(Float64(t * 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 = t * ((c * j) - (x * a)); tmp = 0.0; if (t <= -2.3e+44) tmp = t_1; elseif (t <= 1.3e-150) tmp = b * ((a * i) - (z * c)); elseif (t <= 1.5e-88) tmp = z * ((x * y) - (b * c)); elseif (t <= 1e+73) tmp = j * ((t * 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[(t * N[(N[(c * j), $MachinePrecision] - N[(x * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+44], t$95$1, If[LessEqual[t, 1.3e-150], N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e-88], N[(z * N[(N[(x * y), $MachinePrecision] - N[(b * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e+73], N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $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 -2.3 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-150}:\\
\;\;\;\;b \cdot \left(a \cdot i - z \cdot c\right)\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-88}:\\
\;\;\;\;z \cdot \left(x \cdot y - b \cdot c\right)\\
\mathbf{elif}\;t \leq 10^{+73}:\\
\;\;\;\;j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.30000000000000004e44 or 9.99999999999999983e72 < t Initial program 63.7%
Taylor expanded in t around inf 64.3%
Taylor expanded in a around 0 51.3%
associate-*r*56.3%
+-commutative56.3%
associate-*r*56.3%
neg-mul-156.3%
cancel-sign-sub-inv56.3%
*-commutative56.3%
associate-*l*61.6%
distribute-rgt-out--64.3%
*-commutative64.3%
Simplified64.3%
if -2.30000000000000004e44 < t < 1.2999999999999999e-150Initial program 86.9%
Taylor expanded in b around inf 58.3%
*-commutative58.3%
Simplified58.3%
if 1.2999999999999999e-150 < t < 1.5e-88Initial program 60.7%
Taylor expanded in z around inf 67.6%
*-commutative67.6%
*-commutative67.6%
Simplified67.6%
if 1.5e-88 < t < 9.99999999999999983e72Initial program 72.6%
Taylor expanded in x around 0 62.9%
*-commutative62.9%
Simplified62.9%
Taylor expanded in j around inf 56.9%
Final simplification61.3%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* t c) (* y i)))))
(if (<= j -1e+190)
t_1
(if (<= j -5e+107)
(* c (- (* t j) (* z b)))
(if (<= j -9.5e-75)
(* y (- (* x z) (* i j)))
(if (<= j 3.5e-20) (* b (- (* a i) (* z c))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((t * c) - (y * i));
double tmp;
if (j <= -1e+190) {
tmp = t_1;
} else if (j <= -5e+107) {
tmp = c * ((t * j) - (z * b));
} else if (j <= -9.5e-75) {
tmp = y * ((x * z) - (i * j));
} else if (j <= 3.5e-20) {
tmp = b * ((a * i) - (z * c));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = j * ((t * c) - (y * i))
if (j <= (-1d+190)) then
tmp = t_1
else if (j <= (-5d+107)) then
tmp = c * ((t * j) - (z * b))
else if (j <= (-9.5d-75)) then
tmp = y * ((x * z) - (i * j))
else if (j <= 3.5d-20) then
tmp = b * ((a * i) - (z * c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = j * ((t * c) - (y * i));
double tmp;
if (j <= -1e+190) {
tmp = t_1;
} else if (j <= -5e+107) {
tmp = c * ((t * j) - (z * b));
} else if (j <= -9.5e-75) {
tmp = y * ((x * z) - (i * j));
} else if (j <= 3.5e-20) {
tmp = b * ((a * i) - (z * c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = j * ((t * c) - (y * i)) tmp = 0 if j <= -1e+190: tmp = t_1 elif j <= -5e+107: tmp = c * ((t * j) - (z * b)) elif j <= -9.5e-75: tmp = y * ((x * z) - (i * j)) elif j <= 3.5e-20: tmp = b * ((a * i) - (z * c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i, j) t_1 = Float64(j * Float64(Float64(t * c) - Float64(y * i))) tmp = 0.0 if (j <= -1e+190) tmp = t_1; elseif (j <= -5e+107) tmp = Float64(c * Float64(Float64(t * j) - Float64(z * b))); elseif (j <= -9.5e-75) tmp = Float64(y * Float64(Float64(x * z) - Float64(i * j))); elseif (j <= 3.5e-20) tmp = Float64(b * Float64(Float64(a * i) - Float64(z * c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) t_1 = j * ((t * c) - (y * i)); tmp = 0.0; if (j <= -1e+190) tmp = t_1; elseif (j <= -5e+107) tmp = c * ((t * j) - (z * b)); elseif (j <= -9.5e-75) tmp = y * ((x * z) - (i * j)); elseif (j <= 3.5e-20) tmp = b * ((a * i) - (z * c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -1e+190], t$95$1, If[LessEqual[j, -5e+107], N[(c * N[(N[(t * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, -9.5e-75], N[(y * N[(N[(x * z), $MachinePrecision] - N[(i * j), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 3.5e-20], N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -1 \cdot 10^{+190}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;j \leq -5 \cdot 10^{+107}:\\
\;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right)\\
\mathbf{elif}\;j \leq -9.5 \cdot 10^{-75}:\\
\;\;\;\;y \cdot \left(x \cdot z - i \cdot j\right)\\
\mathbf{elif}\;j \leq 3.5 \cdot 10^{-20}:\\
\;\;\;\;b \cdot \left(a \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if j < -1.0000000000000001e190 or 3.50000000000000003e-20 < j Initial program 73.6%
Taylor expanded in x around 0 79.1%
*-commutative79.1%
Simplified79.1%
Taylor expanded in j around inf 70.3%
if -1.0000000000000001e190 < j < -5.0000000000000002e107Initial program 77.7%
Taylor expanded in c around inf 83.5%
*-commutative83.5%
Simplified83.5%
if -5.0000000000000002e107 < j < -9.4999999999999991e-75Initial program 85.7%
Taylor expanded in y around -inf 65.1%
mul-1-neg65.1%
*-commutative65.1%
distribute-rgt-neg-in65.1%
+-commutative65.1%
mul-1-neg65.1%
unsub-neg65.1%
Simplified65.1%
if -9.4999999999999991e-75 < j < 3.50000000000000003e-20Initial program 70.0%
Taylor expanded in b around inf 58.8%
*-commutative58.8%
Simplified58.8%
Final simplification65.5%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* j (- (* t c) (* y i)))))
(if (or (<= b -1.15e-64) (not (<= b 2.2e+118)))
(+ t_1 (* b (- (* a i) (* z c))))
(+ (* 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 * ((t * c) - (y * i));
double tmp;
if ((b <= -1.15e-64) || !(b <= 2.2e+118)) {
tmp = t_1 + (b * ((a * i) - (z * c)));
} 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 * ((t * c) - (y * i))
if ((b <= (-1.15d-64)) .or. (.not. (b <= 2.2d+118))) then
tmp = t_1 + (b * ((a * i) - (z * c)))
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 * ((t * c) - (y * i));
double tmp;
if ((b <= -1.15e-64) || !(b <= 2.2e+118)) {
tmp = t_1 + (b * ((a * i) - (z * c)));
} 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 * ((t * c) - (y * i)) tmp = 0 if (b <= -1.15e-64) or not (b <= 2.2e+118): tmp = t_1 + (b * ((a * i) - (z * c))) 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(t * c) - Float64(y * i))) tmp = 0.0 if ((b <= -1.15e-64) || !(b <= 2.2e+118)) tmp = Float64(t_1 + Float64(b * Float64(Float64(a * i) - Float64(z * c)))); 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 * ((t * c) - (y * i)); tmp = 0.0; if ((b <= -1.15e-64) || ~((b <= 2.2e+118))) tmp = t_1 + (b * ((a * i) - (z * c))); 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[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -1.15e-64], N[Not[LessEqual[b, 2.2e+118]], $MachinePrecision]], N[(t$95$1 + N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $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(t \cdot c - y \cdot i\right)\\
\mathbf{if}\;b \leq -1.15 \cdot 10^{-64} \lor \neg \left(b \leq 2.2 \cdot 10^{+118}\right):\\
\;\;\;\;t_1 + b \cdot \left(a \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + t_1\\
\end{array}
\end{array}
if b < -1.1500000000000001e-64 or 2.19999999999999986e118 < b Initial program 75.3%
Taylor expanded in x around 0 79.9%
*-commutative79.9%
Simplified79.9%
if -1.1500000000000001e-64 < b < 2.19999999999999986e118Initial program 71.8%
Taylor expanded in b around 0 69.9%
Final simplification75.0%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (- (* a i) (* z c)))) (t_2 (* j (- (* t c) (* y i)))))
(if (<= j -7.8e+143)
(- t_2 (* c (* z b)))
(if (<= j 2.25e-5) (+ (* x (- (* y z) (* t a))) t_1) (+ t_2 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (z * c));
double t_2 = j * ((t * c) - (y * i));
double tmp;
if (j <= -7.8e+143) {
tmp = t_2 - (c * (z * b));
} else if (j <= 2.25e-5) {
tmp = (x * ((y * z) - (t * a))) + t_1;
} else {
tmp = t_2 + 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) :: t_2
real(8) :: tmp
t_1 = b * ((a * i) - (z * c))
t_2 = j * ((t * c) - (y * i))
if (j <= (-7.8d+143)) then
tmp = t_2 - (c * (z * b))
else if (j <= 2.25d-5) then
tmp = (x * ((y * z) - (t * a))) + t_1
else
tmp = t_2 + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * ((a * i) - (z * c));
double t_2 = j * ((t * c) - (y * i));
double tmp;
if (j <= -7.8e+143) {
tmp = t_2 - (c * (z * b));
} else if (j <= 2.25e-5) {
tmp = (x * ((y * z) - (t * a))) + t_1;
} else {
tmp = t_2 + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * ((a * i) - (z * c)) t_2 = j * ((t * c) - (y * i)) tmp = 0 if j <= -7.8e+143: tmp = t_2 - (c * (z * b)) elif j <= 2.25e-5: tmp = (x * ((y * z) - (t * a))) + t_1 else: tmp = t_2 + t_1 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(j * Float64(Float64(t * c) - Float64(y * i))) tmp = 0.0 if (j <= -7.8e+143) tmp = Float64(t_2 - Float64(c * Float64(z * b))); elseif (j <= 2.25e-5) tmp = Float64(Float64(x * Float64(Float64(y * z) - Float64(t * a))) + t_1); else tmp = Float64(t_2 + t_1); 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 = j * ((t * c) - (y * i)); tmp = 0.0; if (j <= -7.8e+143) tmp = t_2 - (c * (z * b)); elseif (j <= 2.25e-5) tmp = (x * ((y * z) - (t * a))) + t_1; else tmp = t_2 + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := Block[{t$95$1 = N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(j * N[(N[(t * c), $MachinePrecision] - N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[j, -7.8e+143], N[(t$95$2 - N[(c * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 2.25e-5], N[(N[(x * N[(N[(y * z), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$2 + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a \cdot i - z \cdot c\right)\\
t_2 := j \cdot \left(t \cdot c - y \cdot i\right)\\
\mathbf{if}\;j \leq -7.8 \cdot 10^{+143}:\\
\;\;\;\;t_2 - c \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;j \leq 2.25 \cdot 10^{-5}:\\
\;\;\;\;x \cdot \left(y \cdot z - t \cdot a\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 + t_1\\
\end{array}
\end{array}
if j < -7.7999999999999997e143Initial program 75.1%
Taylor expanded in x around 0 84.5%
*-commutative84.5%
Simplified84.5%
Taylor expanded in c around inf 81.7%
*-commutative81.7%
associate-*l*84.9%
Simplified84.9%
if -7.7999999999999997e143 < j < 2.25000000000000014e-5Initial program 73.3%
Taylor expanded in j around 0 76.0%
*-commutative76.0%
*-commutative76.0%
Simplified76.0%
if 2.25000000000000014e-5 < j Initial program 73.5%
Taylor expanded in x around 0 79.7%
*-commutative79.7%
Simplified79.7%
Final simplification78.1%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (* z (- c)))))
(if (<= y -1.12e+29)
(* z (* x y))
(if (<= y -9.1e-262)
t_1
(if (<= y 5.2e-182)
(* b (* a i))
(if (<= y 3.9e+158) t_1 (* i (* y (- j)))))))))
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 (y <= -1.12e+29) {
tmp = z * (x * y);
} else if (y <= -9.1e-262) {
tmp = t_1;
} else if (y <= 5.2e-182) {
tmp = b * (a * i);
} else if (y <= 3.9e+158) {
tmp = t_1;
} else {
tmp = i * (y * -j);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * (z * -c)
if (y <= (-1.12d+29)) then
tmp = z * (x * y)
else if (y <= (-9.1d-262)) then
tmp = t_1
else if (y <= 5.2d-182) then
tmp = b * (a * i)
else if (y <= 3.9d+158) then
tmp = t_1
else
tmp = i * (y * -j)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * (z * -c);
double tmp;
if (y <= -1.12e+29) {
tmp = z * (x * y);
} else if (y <= -9.1e-262) {
tmp = t_1;
} else if (y <= 5.2e-182) {
tmp = b * (a * i);
} else if (y <= 3.9e+158) {
tmp = t_1;
} else {
tmp = i * (y * -j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * (z * -c) tmp = 0 if y <= -1.12e+29: tmp = z * (x * y) elif y <= -9.1e-262: tmp = t_1 elif y <= 5.2e-182: tmp = b * (a * i) elif y <= 3.9e+158: tmp = t_1 else: tmp = i * (y * -j) 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 (y <= -1.12e+29) tmp = Float64(z * Float64(x * y)); elseif (y <= -9.1e-262) tmp = t_1; elseif (y <= 5.2e-182) tmp = Float64(b * Float64(a * i)); elseif (y <= 3.9e+158) tmp = t_1; else tmp = Float64(i * Float64(y * Float64(-j))); 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 (y <= -1.12e+29) tmp = z * (x * y); elseif (y <= -9.1e-262) tmp = t_1; elseif (y <= 5.2e-182) tmp = b * (a * i); elseif (y <= 3.9e+158) tmp = t_1; else tmp = i * (y * -j); 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[y, -1.12e+29], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.1e-262], t$95$1, If[LessEqual[y, 5.2e-182], N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.9e+158], t$95$1, N[(i * N[(y * (-j)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(z \cdot \left(-c\right)\right)\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+29}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq -9.1 \cdot 10^{-262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-182}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(y \cdot \left(-j\right)\right)\\
\end{array}
\end{array}
if y < -1.1200000000000001e29Initial program 66.7%
Taylor expanded in z around inf 51.0%
*-commutative51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in y around inf 47.6%
if -1.1200000000000001e29 < y < -9.10000000000000018e-262 or 5.20000000000000011e-182 < y < 3.9e158Initial program 74.8%
Taylor expanded in b around inf 51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in i around 0 37.1%
mul-1-neg37.1%
distribute-rgt-neg-out37.1%
Simplified37.1%
if -9.10000000000000018e-262 < y < 5.20000000000000011e-182Initial program 89.1%
Taylor expanded in b around inf 65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in i around inf 47.1%
if 3.9e158 < y Initial program 64.2%
Taylor expanded in x around 0 61.4%
*-commutative61.4%
Simplified61.4%
Taylor expanded in y around inf 44.2%
associate-*r*44.2%
neg-mul-144.2%
Simplified44.2%
Final simplification41.9%
(FPCore (x y z t a b c i j)
:precision binary64
(let* ((t_1 (* b (* z (- c)))))
(if (<= y -8.9e+30)
(* z (* x y))
(if (<= y -9.1e-262)
t_1
(if (<= y 1.05e-184)
(* b (* a i))
(if (<= y 1.1e+158) t_1 (* y (* i (- j)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * (z * -c);
double tmp;
if (y <= -8.9e+30) {
tmp = z * (x * y);
} else if (y <= -9.1e-262) {
tmp = t_1;
} else if (y <= 1.05e-184) {
tmp = b * (a * i);
} else if (y <= 1.1e+158) {
tmp = t_1;
} else {
tmp = y * (i * -j);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: t_1
real(8) :: tmp
t_1 = b * (z * -c)
if (y <= (-8.9d+30)) then
tmp = z * (x * y)
else if (y <= (-9.1d-262)) then
tmp = t_1
else if (y <= 1.05d-184) then
tmp = b * (a * i)
else if (y <= 1.1d+158) then
tmp = t_1
else
tmp = y * (i * -j)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double t_1 = b * (z * -c);
double tmp;
if (y <= -8.9e+30) {
tmp = z * (x * y);
} else if (y <= -9.1e-262) {
tmp = t_1;
} else if (y <= 1.05e-184) {
tmp = b * (a * i);
} else if (y <= 1.1e+158) {
tmp = t_1;
} else {
tmp = y * (i * -j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): t_1 = b * (z * -c) tmp = 0 if y <= -8.9e+30: tmp = z * (x * y) elif y <= -9.1e-262: tmp = t_1 elif y <= 1.05e-184: tmp = b * (a * i) elif y <= 1.1e+158: tmp = t_1 else: tmp = y * (i * -j) 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 (y <= -8.9e+30) tmp = Float64(z * Float64(x * y)); elseif (y <= -9.1e-262) tmp = t_1; elseif (y <= 1.05e-184) tmp = Float64(b * Float64(a * i)); elseif (y <= 1.1e+158) tmp = t_1; else tmp = Float64(y * Float64(i * Float64(-j))); 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 (y <= -8.9e+30) tmp = z * (x * y); elseif (y <= -9.1e-262) tmp = t_1; elseif (y <= 1.05e-184) tmp = b * (a * i); elseif (y <= 1.1e+158) tmp = t_1; else tmp = y * (i * -j); 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[y, -8.9e+30], N[(z * N[(x * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.1e-262], t$95$1, If[LessEqual[y, 1.05e-184], N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+158], t$95$1, N[(y * N[(i * (-j)), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(z \cdot \left(-c\right)\right)\\
\mathbf{if}\;y \leq -8.9 \cdot 10^{+30}:\\
\;\;\;\;z \cdot \left(x \cdot y\right)\\
\mathbf{elif}\;y \leq -9.1 \cdot 10^{-262}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-184}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(i \cdot \left(-j\right)\right)\\
\end{array}
\end{array}
if y < -8.90000000000000049e30Initial program 66.7%
Taylor expanded in z around inf 51.0%
*-commutative51.0%
*-commutative51.0%
Simplified51.0%
Taylor expanded in y around inf 47.6%
if -8.90000000000000049e30 < y < -9.10000000000000018e-262 or 1.0499999999999999e-184 < y < 1.1000000000000001e158Initial program 74.8%
Taylor expanded in b around inf 51.1%
*-commutative51.1%
Simplified51.1%
Taylor expanded in i around 0 37.1%
mul-1-neg37.1%
distribute-rgt-neg-out37.1%
Simplified37.1%
if -9.10000000000000018e-262 < y < 1.0499999999999999e-184Initial program 89.1%
Taylor expanded in b around inf 65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in i around inf 47.1%
if 1.1000000000000001e158 < y Initial program 64.2%
Taylor expanded in y around -inf 64.5%
mul-1-neg64.5%
*-commutative64.5%
distribute-rgt-neg-in64.5%
+-commutative64.5%
mul-1-neg64.5%
unsub-neg64.5%
Simplified64.5%
Taylor expanded in i around inf 46.9%
Final simplification42.3%
(FPCore (x y z t a b c i j)
:precision binary64
(if (<= j -1.6e+200)
(* y (* i (- j)))
(if (or (<= j -9.5e+121) (not (<= j 4.5e-33)))
(* c (- (* t j) (* z b)))
(* b (- (* a i) (* z c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -1.6e+200) {
tmp = y * (i * -j);
} else if ((j <= -9.5e+121) || !(j <= 4.5e-33)) {
tmp = c * ((t * j) - (z * b));
} else {
tmp = b * ((a * i) - (z * c));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (j <= (-1.6d+200)) then
tmp = y * (i * -j)
else if ((j <= (-9.5d+121)) .or. (.not. (j <= 4.5d-33))) then
tmp = c * ((t * j) - (z * b))
else
tmp = b * ((a * i) - (z * c))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (j <= -1.6e+200) {
tmp = y * (i * -j);
} else if ((j <= -9.5e+121) || !(j <= 4.5e-33)) {
tmp = c * ((t * j) - (z * b));
} else {
tmp = b * ((a * i) - (z * c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -1.6e+200: tmp = y * (i * -j) elif (j <= -9.5e+121) or not (j <= 4.5e-33): tmp = c * ((t * j) - (z * b)) else: tmp = b * ((a * i) - (z * c)) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -1.6e+200) tmp = Float64(y * Float64(i * Float64(-j))); elseif ((j <= -9.5e+121) || !(j <= 4.5e-33)) tmp = Float64(c * Float64(Float64(t * j) - Float64(z * b))); else tmp = Float64(b * Float64(Float64(a * i) - Float64(z * c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (j <= -1.6e+200) tmp = y * (i * -j); elseif ((j <= -9.5e+121) || ~((j <= 4.5e-33))) tmp = c * ((t * j) - (z * b)); else tmp = b * ((a * i) - (z * c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -1.6e+200], N[(y * N[(i * (-j)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[j, -9.5e+121], N[Not[LessEqual[j, 4.5e-33]], $MachinePrecision]], N[(c * N[(N[(t * j), $MachinePrecision] - N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.6 \cdot 10^{+200}:\\
\;\;\;\;y \cdot \left(i \cdot \left(-j\right)\right)\\
\mathbf{elif}\;j \leq -9.5 \cdot 10^{+121} \lor \neg \left(j \leq 4.5 \cdot 10^{-33}\right):\\
\;\;\;\;c \cdot \left(t \cdot j - z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot i - z \cdot c\right)\\
\end{array}
\end{array}
if j < -1.60000000000000016e200Initial program 74.1%
Taylor expanded in y around -inf 57.4%
mul-1-neg57.4%
*-commutative57.4%
distribute-rgt-neg-in57.4%
+-commutative57.4%
mul-1-neg57.4%
unsub-neg57.4%
Simplified57.4%
Taylor expanded in i around inf 57.2%
if -1.60000000000000016e200 < j < -9.49999999999999949e121 or 4.49999999999999991e-33 < j Initial program 74.3%
Taylor expanded in c around inf 56.2%
*-commutative56.2%
Simplified56.2%
if -9.49999999999999949e121 < j < 4.49999999999999991e-33Initial program 73.1%
Taylor expanded in b around inf 55.3%
*-commutative55.3%
Simplified55.3%
Final simplification55.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= j -1.62e+156) (* i (* y (- j))) (if (<= j 7.5e+101) (* b (- (* a i) (* z c))) (* 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 <= -1.62e+156) {
tmp = i * (y * -j);
} else if (j <= 7.5e+101) {
tmp = b * ((a * i) - (z * c));
} 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 <= (-1.62d+156)) then
tmp = i * (y * -j)
else if (j <= 7.5d+101) then
tmp = b * ((a * i) - (z * c))
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 <= -1.62e+156) {
tmp = i * (y * -j);
} else if (j <= 7.5e+101) {
tmp = b * ((a * i) - (z * c));
} else {
tmp = t * (c * j);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if j <= -1.62e+156: tmp = i * (y * -j) elif j <= 7.5e+101: tmp = b * ((a * i) - (z * c)) else: tmp = t * (c * j) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (j <= -1.62e+156) tmp = Float64(i * Float64(y * Float64(-j))); elseif (j <= 7.5e+101) tmp = Float64(b * Float64(Float64(a * i) - Float64(z * c))); 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 <= -1.62e+156) tmp = i * (y * -j); elseif (j <= 7.5e+101) tmp = b * ((a * i) - (z * c)); else tmp = t * (c * j); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[j, -1.62e+156], N[(i * N[(y * (-j)), $MachinePrecision]), $MachinePrecision], If[LessEqual[j, 7.5e+101], N[(b * N[(N[(a * i), $MachinePrecision] - N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(c * j), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;j \leq -1.62 \cdot 10^{+156}:\\
\;\;\;\;i \cdot \left(y \cdot \left(-j\right)\right)\\
\mathbf{elif}\;j \leq 7.5 \cdot 10^{+101}:\\
\;\;\;\;b \cdot \left(a \cdot i - z \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(c \cdot j\right)\\
\end{array}
\end{array}
if j < -1.62000000000000006e156Initial program 76.0%
Taylor expanded in x around 0 82.9%
*-commutative82.9%
Simplified82.9%
Taylor expanded in y around inf 56.6%
associate-*r*56.6%
neg-mul-156.6%
Simplified56.6%
if -1.62000000000000006e156 < j < 7.4999999999999995e101Initial program 72.1%
Taylor expanded in b around inf 54.1%
*-commutative54.1%
Simplified54.1%
if 7.4999999999999995e101 < j Initial program 77.3%
Taylor expanded in t around inf 53.9%
Taylor expanded in a around 0 50.2%
Final simplification53.6%
(FPCore (x y z t a b c i j) :precision binary64 (if (or (<= i -4.2e-68) (not (<= i 2.95e+23))) (* a (* b i)) (* a (* x t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((i <= -4.2e-68) || !(i <= 2.95e+23)) {
tmp = a * (b * i);
} else {
tmp = a * (x * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if ((i <= (-4.2d-68)) .or. (.not. (i <= 2.95d+23))) then
tmp = a * (b * i)
else
tmp = a * (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if ((i <= -4.2e-68) || !(i <= 2.95e+23)) {
tmp = a * (b * i);
} else {
tmp = a * (x * t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if (i <= -4.2e-68) or not (i <= 2.95e+23): tmp = a * (b * i) else: tmp = a * (x * t) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if ((i <= -4.2e-68) || !(i <= 2.95e+23)) tmp = Float64(a * Float64(b * i)); else tmp = Float64(a * Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if ((i <= -4.2e-68) || ~((i <= 2.95e+23))) tmp = a * (b * i); else tmp = a * (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[Or[LessEqual[i, -4.2e-68], N[Not[LessEqual[i, 2.95e+23]], $MachinePrecision]], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision], N[(a * N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4.2 \cdot 10^{-68} \lor \neg \left(i \leq 2.95 \cdot 10^{+23}\right):\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(x \cdot t\right)\\
\end{array}
\end{array}
if i < -4.20000000000000016e-68 or 2.94999999999999994e23 < i Initial program 67.0%
Taylor expanded in b around inf 55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in i around inf 38.0%
if -4.20000000000000016e-68 < i < 2.94999999999999994e23Initial program 80.7%
Taylor expanded in t around inf 47.0%
Taylor expanded in a around inf 20.2%
associate-*r*20.2%
neg-mul-120.2%
*-commutative20.2%
Simplified20.2%
expm1-log1p-u8.4%
expm1-udef7.6%
add-sqr-sqrt3.8%
sqrt-unprod6.0%
sqr-neg6.0%
sqrt-unprod3.8%
add-sqr-sqrt7.1%
*-commutative7.1%
Applied egg-rr7.1%
expm1-def7.2%
expm1-log1p11.7%
Simplified11.7%
Final simplification25.3%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= i -1.85e-255) (* b (* a i)) (if (<= i 2.15e+23) (* a (* x t)) (* a (* b i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.85e-255) {
tmp = b * (a * i);
} else if (i <= 2.15e+23) {
tmp = a * (x * t);
} else {
tmp = a * (b * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (i <= (-1.85d-255)) then
tmp = b * (a * i)
else if (i <= 2.15d+23) then
tmp = a * (x * t)
else
tmp = a * (b * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -1.85e-255) {
tmp = b * (a * i);
} else if (i <= 2.15e+23) {
tmp = a * (x * t);
} else {
tmp = a * (b * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -1.85e-255: tmp = b * (a * i) elif i <= 2.15e+23: tmp = a * (x * t) else: tmp = a * (b * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -1.85e-255) tmp = Float64(b * Float64(a * i)); elseif (i <= 2.15e+23) tmp = Float64(a * Float64(x * t)); else tmp = Float64(a * Float64(b * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -1.85e-255) tmp = b * (a * i); elseif (i <= 2.15e+23) tmp = a * (x * t); else tmp = a * (b * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -1.85e-255], N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.15e+23], N[(a * N[(x * t), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.85 \cdot 10^{-255}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\mathbf{elif}\;i \leq 2.15 \cdot 10^{+23}:\\
\;\;\;\;a \cdot \left(x \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\end{array}
\end{array}
if i < -1.8500000000000001e-255Initial program 72.4%
Taylor expanded in b around inf 48.9%
*-commutative48.9%
Simplified48.9%
Taylor expanded in i around inf 29.2%
if -1.8500000000000001e-255 < i < 2.1499999999999999e23Initial program 82.7%
Taylor expanded in t around inf 46.7%
Taylor expanded in a around inf 21.4%
associate-*r*21.4%
neg-mul-121.4%
*-commutative21.4%
Simplified21.4%
expm1-log1p-u9.7%
expm1-udef9.7%
add-sqr-sqrt5.4%
sqrt-unprod7.0%
sqr-neg7.0%
sqrt-unprod4.1%
add-sqr-sqrt8.4%
*-commutative8.4%
Applied egg-rr8.4%
expm1-def8.5%
expm1-log1p14.1%
Simplified14.1%
if 2.1499999999999999e23 < i Initial program 63.1%
Taylor expanded in b around inf 55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in i around inf 44.5%
Final simplification27.8%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= i -4.7e-54) (* b (* a i)) (if (<= i 1.65e+100) (* c (* t j)) (* a (* b i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -4.7e-54) {
tmp = b * (a * i);
} else if (i <= 1.65e+100) {
tmp = c * (t * j);
} else {
tmp = a * (b * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (i <= (-4.7d-54)) then
tmp = b * (a * i)
else if (i <= 1.65d+100) then
tmp = c * (t * j)
else
tmp = a * (b * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -4.7e-54) {
tmp = b * (a * i);
} else if (i <= 1.65e+100) {
tmp = c * (t * j);
} else {
tmp = a * (b * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -4.7e-54: tmp = b * (a * i) elif i <= 1.65e+100: tmp = c * (t * j) else: tmp = a * (b * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -4.7e-54) tmp = Float64(b * Float64(a * i)); elseif (i <= 1.65e+100) tmp = Float64(c * Float64(t * j)); else tmp = Float64(a * Float64(b * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -4.7e-54) tmp = b * (a * i); elseif (i <= 1.65e+100) tmp = c * (t * j); else tmp = a * (b * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -4.7e-54], N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.65e+100], N[(c * N[(t * j), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -4.7 \cdot 10^{-54}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\mathbf{elif}\;i \leq 1.65 \cdot 10^{+100}:\\
\;\;\;\;c \cdot \left(t \cdot j\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\end{array}
\end{array}
if i < -4.7e-54Initial program 69.5%
Taylor expanded in b around inf 55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in i around inf 41.2%
if -4.7e-54 < i < 1.6500000000000001e100Initial program 79.0%
Taylor expanded in t around inf 48.5%
Taylor expanded in a around 0 27.7%
*-commutative27.7%
Simplified27.7%
if 1.6500000000000001e100 < i Initial program 61.6%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
Taylor expanded in i around inf 51.5%
Final simplification35.2%
(FPCore (x y z t a b c i j) :precision binary64 (if (<= i -9.6e-59) (* b (* a i)) (if (<= i 1.5e+99) (* j (* t c)) (* a (* b i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -9.6e-59) {
tmp = b * (a * i);
} else if (i <= 1.5e+99) {
tmp = j * (t * c);
} else {
tmp = a * (b * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
real(8) :: tmp
if (i <= (-9.6d-59)) then
tmp = b * (a * i)
else if (i <= 1.5d+99) then
tmp = j * (t * c)
else
tmp = a * (b * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
double tmp;
if (i <= -9.6e-59) {
tmp = b * (a * i);
} else if (i <= 1.5e+99) {
tmp = j * (t * c);
} else {
tmp = a * (b * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i, j): tmp = 0 if i <= -9.6e-59: tmp = b * (a * i) elif i <= 1.5e+99: tmp = j * (t * c) else: tmp = a * (b * i) return tmp
function code(x, y, z, t, a, b, c, i, j) tmp = 0.0 if (i <= -9.6e-59) tmp = Float64(b * Float64(a * i)); elseif (i <= 1.5e+99) tmp = Float64(j * Float64(t * c)); else tmp = Float64(a * Float64(b * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i, j) tmp = 0.0; if (i <= -9.6e-59) tmp = b * (a * i); elseif (i <= 1.5e+99) tmp = j * (t * c); else tmp = a * (b * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := If[LessEqual[i, -9.6e-59], N[(b * N[(a * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 1.5e+99], N[(j * N[(t * c), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -9.6 \cdot 10^{-59}:\\
\;\;\;\;b \cdot \left(a \cdot i\right)\\
\mathbf{elif}\;i \leq 1.5 \cdot 10^{+99}:\\
\;\;\;\;j \cdot \left(t \cdot c\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(b \cdot i\right)\\
\end{array}
\end{array}
if i < -9.6000000000000006e-59Initial program 69.5%
Taylor expanded in b around inf 55.8%
*-commutative55.8%
Simplified55.8%
Taylor expanded in i around inf 41.2%
if -9.6000000000000006e-59 < i < 1.50000000000000007e99Initial program 79.0%
Taylor expanded in x around 0 64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in c around inf 60.8%
*-commutative60.8%
associate-*l*58.2%
Simplified58.2%
Taylor expanded in t around inf 27.7%
*-commutative27.7%
associate-*l*32.2%
Simplified32.2%
if 1.50000000000000007e99 < i Initial program 61.6%
Taylor expanded in b around inf 59.6%
*-commutative59.6%
Simplified59.6%
Taylor expanded in i around inf 51.5%
Final simplification37.7%
(FPCore (x y z t a b c i j) :precision binary64 (* a (* b i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (b * i);
}
real(8) function code(x, y, z, t, a, b, c, i, j)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8), intent (in) :: j
code = a * (b * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i, double j) {
return a * (b * i);
}
def code(x, y, z, t, a, b, c, i, j): return a * (b * i)
function code(x, y, z, t, a, b, c, i, j) return Float64(a * Float64(b * i)) end
function tmp = code(x, y, z, t, a, b, c, i, j) tmp = a * (b * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_, j_] := N[(a * N[(b * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a \cdot \left(b \cdot i\right)
\end{array}
Initial program 73.6%
Taylor expanded in b around inf 47.2%
*-commutative47.2%
Simplified47.2%
Taylor expanded in i around inf 21.9%
Final simplification21.9%
(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 2024020
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
:precision binary64
:herbie-target
(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)))))