Average Error: 6.9 → 3.8
Time: 36.5s
Precision: 64
Internal Precision: 576
$r0 \cdot \left(r4 \cdot r8 - r5 \cdot r7\right)$
$\begin{array}{l} \mathbf{if}\;r4 \cdot r8 \le -3.826238410586894 \cdot 10^{+265}:\\ \;\;\;\;\left(r0 \cdot r4\right) \cdot r8\\ \mathbf{elif}\;r4 \cdot r8 \le 1.957047707642406 \cdot 10^{+282}:\\ \;\;\;\;\left(r4 \cdot r8 - r7 \cdot r5\right) \cdot r0\\ \mathbf{else}:\\ \;\;\;\;\left(r0 \cdot r4\right) \cdot r8\\ \end{array}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Split input into 2 regimes
2. ## if (* r4 r8) < -3.826238410586894e+265 or 1.957047707642406e+282 < (* r4 r8)

1. Initial program 45.2

$r0 \cdot \left(r4 \cdot r8 - r5 \cdot r7\right)$
2. Initial simplification45.2

$\leadsto \left(r4 \cdot r8 - r5 \cdot r7\right) \cdot r0$
3. Using strategy rm

$\leadsto \color{blue}{\left(\left(\sqrt[3]{r4 \cdot r8 - r5 \cdot r7} \cdot \sqrt[3]{r4 \cdot r8 - r5 \cdot r7}\right) \cdot \sqrt[3]{r4 \cdot r8 - r5 \cdot r7}\right)} \cdot r0$
5. Taylor expanded around inf 59.6

$\leadsto \color{blue}{r0 \cdot e^{-1 \cdot \left(\log \left(\frac{1}{r8}\right) + \log \left(\frac{1}{r4}\right)\right)}}$
6. Simplified3.5

$\leadsto \color{blue}{r8 \cdot \left(r4 \cdot r0\right)}$

## if -3.826238410586894e+265 < (* r4 r8) < 1.957047707642406e+282

1. Initial program 3.8

$r0 \cdot \left(r4 \cdot r8 - r5 \cdot r7\right)$
2. Initial simplification3.8

$\leadsto \left(r4 \cdot r8 - r5 \cdot r7\right) \cdot r0$
3. Recombined 2 regimes into one program.
4. Final simplification3.8

$\leadsto \begin{array}{l} \mathbf{if}\;r4 \cdot r8 \le -3.826238410586894 \cdot 10^{+265}:\\ \;\;\;\;\left(r0 \cdot r4\right) \cdot r8\\ \mathbf{elif}\;r4 \cdot r8 \le 1.957047707642406 \cdot 10^{+282}:\\ \;\;\;\;\left(r4 \cdot r8 - r7 \cdot r5\right) \cdot r0\\ \mathbf{else}:\\ \;\;\;\;\left(r0 \cdot r4\right) \cdot r8\\ \end{array}$

# Runtime

Time bar (total: 36.5s)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (r0 r4 r8 r5 r7)
:name "r0*(r4*r8-r5*r7)"
(* r0 (- (* r4 r8) (* r5 r7))))