Average Error: 12.5 → 10.3
Time: 1.2m
Precision: 64
Internal precision: 128
\[\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)\]
⬇
\[\begin{array}{l}
\mathbf{if}\;a \le 2.3403364003398004 \cdot 10^{+122}:\\
\;\;\;\;\left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + {\left(\sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\right)}^3\\
\mathbf{else}:\\
\;\;\;\;\left(j \cdot \left(t \cdot c - y \cdot i\right) - \left(b \cdot z\right) \cdot c\right) + \left(b \cdot i - x \cdot t\right) \cdot a\\
\end{array}\]
Derivation
- Split input into 2 regimes.
-
if a < 2.3403364003398004e+122
Initial program 10.4
\[\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)\]
- Using strategy
rm
Applied add-cube-cbrt 10.7
\[\leadsto \left(x \cdot \left(y \cdot z - t \cdot a\right) - b \cdot \left(c \cdot z - i \cdot a\right)\right) + \color{blue}{{\left(\sqrt[3]{j \cdot \left(c \cdot t - i \cdot y\right)}\right)}^3}\]
if 2.3403364003398004e+122 < a
Initial program 29.4
\[\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)\]
Applied taylor 23.1
\[\leadsto \left(i \cdot \left(b \cdot a\right) - \left(c \cdot \left(b \cdot z\right) + t \cdot \left(x \cdot a\right)\right)\right) + j \cdot \left(c \cdot t - i \cdot y\right)\]
Taylor expanded around inf 23.1
\[\leadsto \color{blue}{\left(i \cdot \left(b \cdot a\right) - \left(c \cdot \left(b \cdot z\right) + t \cdot \left(x \cdot a\right)\right)\right)} + j \cdot \left(c \cdot t - i \cdot y\right)\]
Applied simplify 7.3
\[\leadsto \color{blue}{\left(j \cdot \left(t \cdot c - y \cdot i\right) - \left(b \cdot z\right) \cdot c\right) + \left(b \cdot i - x \cdot t\right) \cdot a}\]
- Recombined 2 regimes into one program.
- Removed slow pow expressions
Runtime
Please include this information when filing a bug report:
herbie --seed '#(3736595957 782161910 3919562515 2826787545 34303917 2518565596)'
(FPCore (x y z t a b c i j)
:name "Linear.Matrix:det33 from linear-1.19.1.3"
(+ (- (* x (- (* y z) (* t a))) (* b (- (* c z) (* i a)))) (* j (- (* c t) (* i y)))))